2.0.7 • Published 2 months ago

@dineroregnskab/eslint-plugin-custom-rules v2.0.7

Weekly downloads
-
License
ISC
Repository
-
Last release
2 months ago

Dinero Custom ESLint Rules

Custom extended rules for various Dinero specific standards & conventions.

Installation

Bundled with dinero.Frontend & dinero.Admin package.json, so a general npm install will include it as default.

Explicit install:

npm install @dineroregnskab/eslint-plugin-eslint-custom-rules@latest --save-dev

Adding rules

Add the rule here:

dinero-web-2.0/Dinero.Packages/Dinero.EslintCustomRules/rules

You can test the rule by adding some code to test it on here.

dinero-web-2.0/Dinero.Packages/Dinero.EslintCustomRules/example

And run:

npx eslint test.ts

Publish & install new rule locally

Run:

npm patch
npm publish
  • In dinero.Frontend and/or dinero.Admin, update the root package.json file with the newly published version number.
  • Locate the eslintrc file and add the new rule in the rules property (under "files": ["*.html"], "files": ["*.ts"] etc. respectively).

    Note: The reference here must be in the format of the package name without "eslint-plugin" + rule name

Example:

"@dineroregnskab/custom-rules/reducers-should-always-return": ["warn"]

  • Run
npm i

Note: You might need to restart the IDE for the new rule to apply

See ESLint custom rule tutorial for more.

Useful tool for working with AST tree: AST Explorer

License

MIT

2.0.7

2 months ago

2.0.6

2 months ago

2.0.5

6 months ago

2.0.4

6 months ago

2.0.3

6 months ago

2.0.2

6 months ago

2.0.1

6 months ago

2.0.0

6 months ago

1.0.8

6 months ago

1.0.7

6 months ago

1.0.6

6 months ago

1.0.5

6 months ago

1.0.4

6 months ago

1.0.3

6 months ago

1.0.2

6 months ago

1.0.1

6 months ago

1.0.0

6 months ago