5.8.112 • Published 10 months ago

@diotoborg/eos-eum v5.8.112

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

@diotoborg/eos-eum

A plugin for ESLint that allows you to use project-specific rules, similar to the deprecated --rulesdir command line option (more).

Install

npm install @diotoborg/eos-eum

./eslint-local-rules.js (or ./eslint-local-rules/index.js)

'use strict';

module.exports = {
  'disallow-identifiers': {
    meta: {
      docs: {
        description: 'disallow identifiers',
        category: 'Possible Errors',
      },
      schema: [],
    },
    create: function (context) {
      return {
        Identifier: function (node) {
          context.report({
            node: node,
            message: 'Identifiers not allowed for Super Important reasons.',
          });
        },
      };
    },
  },
};

./.eslintrc

{
  "plugins": ["@diotoborg/eos-eum"],

  "rules": {
    "local-rules/disallow-identifiers": "error"
  }
}

Usage (TypeScript)

npm install ts-node @types/eslint

You'll also need an eslint config like the .eslintrc above (more info).

./eslint-local-rules/index.js

require("ts-node").register({
  transpileOnly: true,
  compilerOptions: {
    module: "commonjs",
  },
});

module.exports = require("./rules").default;

./eslint-local-rules/rules.ts

import type { Rule } from "eslint";

export default {
  "disallow-identifiers": {
    meta: {
      docs: {
        description: 'disallow identifiers',
        category: 'Possible Errors',
      },
      schema: [],
    },
    create: function (context) {
      return {
        Identifier: function (node) {
          context.report({
            node: node,
            message: 'Identifiers not allowed for Super Important reasons.',
          });
        },
      };
    },
  },
} satisfies Record<string, Rule.RuleModule>;

npm/yarn/pnpm workspaces support

This plugin supports npm/yarn/pnpm workspaces, although note that if the eslint-local-rules.js file is in the workspace subdirectory, running from the project root is unsupported.

For example, if there's an eslint-local-rules.js and index.js in ./src/app:

Wrong: npx eslint src/app/index.js

Right: (cd src/app; npx eslint index.js)

Also note that if there is an eslint-local-rules.js file in both the workspace subdirectory and project root, the workspace one takes precedence (assuming you're running eslint from the workspace directory, as above).

Alternatives

Context for this plugin

License

MIT

prototypeObjecttypedarraysnoderobustchildeslintpluginsyntaxPromisereact posejsxFunction.prototype.namepackage.jsontoolstransformpopmotionObject.entrieschromiumfnmatchparseryupInt32ArraybrowserlistresolveformatmkdirrouterschemeargshooksObject.getPrototypeOfreactdataviewArray.prototype.flattenenvironmentcharactersbinprivate data$.extendarktypeCSSautoprefixeres7deepcopyprocessmkdirpmanagerwriteshebangfunctionalutilshellatomRegExp.prototype.flagslibphonenumberescapeUint32ArrayesECMAScript 2015walkingeventsbuffersfantasy-landbddomitcomputed-typesfastcloneexecutejasmineregular expressionformstrimStartpushregexsharedflagssuperstructletcloudformationconstfixed-widthpipebinarywarningwafES2022fastifyes2016inspectmobilepromisestringgetexecpackageArray.prototype.flatdragkoreanchaiURLSearchParamsawsObject.fromEntriesmake dirsqshasOwnPropertyimportexporttoolkitdebugsyntaxerrorstoragegatewayisConcatSpreadablevalidatearraysbrowservpces-shim APIfullwidthfsasyncgdprpyyamltypesjsonschemaUint16Arrayinternalslotimmutablemulti-packagekeyspropertiesutilityebspathcontainsformmonorepoArray.prototype.filtertextES2019kinesissidegetPrototypeOfwebslicepropertyjesttostringtagFloat64ArrayES2020rapidbusyfolderdotenvdeterministicrequestdefinePropertyObject.keysacornasserttapglobstreamdeleteWeakSetutil.inspecthtmllistenerssettingsairbnbtimegesturestypeofarraybuffertrimjson-schema-validationcodesfast-clonenumbertypedfast-deep-copyoptimizerdebuggerWeakMaptyped arrayECMAScript 2019css-in-jscommanderqshasJSON-SchemaMapcollection.es6censorlocationefficientramdafast-copydependency managerhashcommandwidthjQuerytransportzxArray.prototype.includesconcatregular expressionslinkObservablerequiremergeanimationglacierfile systememitloadbalancing_.extendforkenvironmentsReactiveXObservablesmomentcolourvaluecore-jscompilercopyIteratorregularbytefull-widthsuperagent__proto__toStringTagfast-deep-clonehookformenumerabletslibES7envbabel-coreclientjavascriptcurriedintrinsicInt16ArrayaccessibilitysettermatchinstrumentationclassnamesappgetoptpuregitignorereadStyleSheetvestnopefunctionsdirs3makehardlinkscollectionfeedglobalThisistanbulcloudtrailidWebSocketsmapreduceloggeryamlrm -rfArray.prototype.findLastIndexinferenceeventDispatchertoArrayimportselfsetImmediateinputArray.prototype.findLastnativetouches8protocol-bufferscurlpatchlinthttpscheckstructuredCloneextratelephoneconfigurabletacitform-validationsymbolstrimLeftprettyrgbflagttygroupoptionpostcss-pluginclassesreverseweakmapexecfileStreamsrm -frfullredirectviewjsonextendterminalconfiges2017modulesquerystringexpress256stringifierlastinflatl10ni18nTypeBoxcjkassigncachechannelastweaksetUint8ClampedArrayeslintchineseagentfindremoveargvendereslintconfigqueryelbcircularestreenegativezodfindupapiwalkcryptoES3iamSymbolvartypescriptreact-hookscloudwatchtypaniones6source mapavaES2016.envcommand-lineserializerconsoleshrinkwrapieroutingspeedlockfileconsumetraversejson-schemarangeerrorRegExp#flagsfpwaapicallboundstylingES2023deep-cloneArraydescriptorsincludestoobjectcloudfrontrssreducedom-testing-libraryeventEmitterpostcssonceequalityobjectTypeScriptrdsio-tsrecursivegetOwnPropertyDescriptorsortvalidatorbeanstalkvariables@@toStringTagbannerlengthspecwhatwgshamES2017pnpm93dpreprocessorparsesafeclassnameutilscall-boundfigletString.prototype.trimhelpercoerciblelocalstyled-componentsjshintamazonfindLastIndexYAMLerrorvisual.gitignoreignorefpsjsdiffdatareal-timefindLastapollooffsetserializationdefinejoiwhichreadablestreamlook-upCSSStyleDeclarationequalawesomesaucees-shimskarmauninstallbuffertoReversedxmlnpmcharacteruser-streamschromeObject.issymboles5ESnextwaitidleguidswfponyfillcall-bindECMAScript 2020flattenspinnercoveragesetownasciisinatraRxJSmruworkflowfromgetintrinsicshimECMAScript 2018setPrototypeOfObject.definePropertyharmonypositivees2015JSONiteratetrimEndwritablequotejapaneseECMAScript 6spinnersqueueMicrotasktermreduxprivateURLMicrosofthasOwnreversedserializepruneECMAScript 2016filterparentspringjscallbindec2emrcomparedeepcloneString.prototype.matchAllbyteLengthvalidassertioncliES6east-asian-widthpicomatchlanguagewindowReactiveExtensionsdependencieseslint-pluginelectronFloat32Arraytakestreamsredux-toolkitglobal this valuecreatetsECMAScript 2023phonebundlertapeES2015matchAllUnderscoreprop6to5react animationforEachreadableemojilruproxycallbackjson-schema-validatorecmascripttoSortedespreerestendpoint-0Object.assignSystem.globalaccessores-abstractsameValueZeroposeinstallergraphqlbundlingmkdirsES2021autoscalingESsymlinksreusePushartstarterWebSocketcolumnconcatMapES5stableAsyncIteratorperformancerandomprotobufinternal slotStreamtddArray.prototype.flatMappackage managerECMAScript 2021higher-orderprogresstypequeueupglobalsharedarraybuffersubprocessworkerimmerhttprulesspawnsortedargumentsnsECMAScript 7Reflect.getPrototypeOfdiffexpressiondescriptorsomewgetschematrimRightSetxhrworkspace:*clonefunction.lengthBigInt64ArrayInt8ArrayArray.prototype.containsparentsstringifyECMAScript 2017Object.valuescolumnsnameajvSymbol.toStringTagajaxnodejsjsdomzeroreact-testing-libraryobjindicatorroute53transpilercssredactflatMaptypedarrayfastcoreglobalsgroupByasteriskskeyrmdirectoryfind-upregexpbinariesbindstylesmochamovemanipulationfileformattingArrayBuffer.prototype.sliceoutputurldayjs[[Prototype]]dateframeworkperformantECMAScript 5
5.8.111

10 months ago

5.8.112

10 months ago

5.8.110

10 months ago

5.8.109

10 months ago

5.8.108

10 months ago

5.8.107

10 months ago

5.8.106

10 months ago

5.8.105

10 months ago

5.8.104

10 months ago

5.8.103

10 months ago

5.8.102

10 months ago

5.8.101

10 months ago

5.8.100

10 months ago

5.8.99

10 months ago

5.8.98

10 months ago

4.8.98

10 months ago

4.8.97

10 months ago

4.8.96

11 months ago

4.8.95

11 months ago

4.8.94

11 months ago

4.8.93

11 months ago

4.8.92

11 months ago

4.8.91

11 months ago

4.8.90

11 months ago

4.8.89

11 months ago

4.8.88

11 months ago

4.8.87

11 months ago

4.8.86

11 months ago

4.7.86

11 months ago

4.6.86

11 months ago

4.6.85

11 months ago

4.6.84

11 months ago

4.6.83

11 months ago

4.6.82

11 months ago

4.6.81

11 months ago

4.5.81

11 months ago

4.5.80

11 months ago

4.5.79

11 months ago

4.5.78

11 months ago

4.5.77

11 months ago

4.5.76

11 months ago

4.5.75

11 months ago

4.5.74

11 months ago

4.5.73

11 months ago

3.5.73

11 months ago

3.5.72

11 months ago

3.5.71

11 months ago

3.5.70

12 months ago

3.5.69

12 months ago

3.5.68

12 months ago

3.5.67

12 months ago

3.5.66

12 months ago

3.5.65

12 months ago

3.5.64

12 months ago

3.5.63

12 months ago

3.4.63

12 months ago

3.4.62

12 months ago

3.4.61

12 months ago

3.4.60

12 months ago

3.4.59

12 months ago

3.4.58

12 months ago

3.4.57

12 months ago

3.4.56

12 months ago

3.4.55

12 months ago

3.4.54

12 months ago

3.4.53

12 months ago

3.4.52

12 months ago

3.4.51

1 year ago

3.4.50

1 year ago

3.4.49

1 year ago

3.4.48

1 year ago

3.4.47

1 year ago

3.4.46

1 year ago

3.4.45

1 year ago

3.4.44

1 year ago

3.4.43

1 year ago

3.4.42

1 year ago

3.4.41

1 year ago

3.4.40

1 year ago

3.4.39

1 year ago

3.4.38

1 year ago

3.4.37

1 year ago

3.4.36

1 year ago

3.3.36

1 year ago

3.2.36

1 year ago

3.2.35

1 year ago

3.1.35

1 year ago

3.1.34

1 year ago

3.1.33

1 year ago

3.1.32

1 year ago

3.1.31

1 year ago

3.1.30

1 year ago

3.1.29

1 year ago

3.1.28

1 year ago

3.1.27

1 year ago

3.1.26

1 year ago

3.1.25

1 year ago

3.1.24

1 year ago

3.1.23

1 year ago

2.1.23

1 year ago

2.1.22

1 year ago

2.1.21

1 year ago

2.1.20

1 year ago

2.1.19

1 year ago

2.1.18

1 year ago

1.1.18

1 year ago

1.1.17

1 year ago

1.1.16

1 year ago

1.1.15

1 year ago

1.1.14

1 year ago

1.1.13

1 year ago

1.1.12

1 year ago

1.1.11

1 year ago

1.1.8

1 year ago

1.1.7

1 year ago

1.1.6

1 year ago

1.1.5

1 year ago

1.1.4

1 year ago

1.1.3

1 year ago

1.1.2

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.0

1 year ago