Gathering detailed insights and metrics for @neatfreak/eslint-plugin
Gathering detailed insights and metrics for @neatfreak/eslint-plugin
Gathering detailed insights and metrics for @neatfreak/eslint-plugin
Gathering detailed insights and metrics for @neatfreak/eslint-plugin
npm install @neatfreak/eslint-plugin
Typescript
Module System
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
1 Commits
1 Branches
1 Contributors
Updated on Nov 12, 2021
Latest Version
1.0.0-pre.0
Package Id
@neatfreak/eslint-plugin@1.0.0-pre.0
Unpacked Size
22.78 kB
Size
6.73 kB
File Count
16
NPM Version
7.13.0
Node Version
16.2.0
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
13
16
Cleans up nicely
@neatfreak/eslint-plugin
This plugin provides opinionated, sensible rules that...
Rules that might cause excessive errors and are not auto-fixable are set to "warn".
For these reasons, many rules are enabled and, of those, most are using the recommended configuration except where it makes sense for achieving said goals. When used with Prettier, conflicting rules are disabled.
If there is a rule you just can't stomach, simply override it. This way you have a solid starting point. Publish your version publicly or privately and share it within your organization to maintain consistency between all your projects!
If you feel like any rule is just too cumbersome or restrictive, in general, please consider contributing to this project and let's make it better together!
💁♂️ You might also consider using @therealklanni/prettier-config
(and what they configure)
plugin:@neatfreak/base
(must always be applied first)plugin:@neatfreak/typescript
plugin:@neatfreak/react
plugin:@neatfreak/jest
plugin:@neatfreak/node
or plugin:@neatfreak/cli
plugin:@neatfreak/prettier
(must always be applied last)
Install required dependencies
npm install -D @neatfreak/eslint-plugin eslint
Optionally, view and install any additional dependencies, as needed
# list dependencies
npm view @neatfreak/eslint-plugin peerDependencies
# install what you need
npm install -D eslint-plugin-{jest,node,react} @neatfreak/prettier-config ...
Configure as shown here (more examples below)
1{ 2 // the only plugin you need to specify is this one 3 // or any plugin not provided by this one 4 "plugins": ["@neatfreak"], 5 "extends": ["plugin:@neatfreak/base", "plugin:@neatfreak/prettier"] 6}
???
Profit
DIY file globs. Allows for more control over how configs are applied.
1{ 2 "plugins": ["@neatfreak"], 3 "extends": [ 4 "some-unrelated-config", 5 // apply @neatfreak configs after unrelated configs 6 "plugin:@neatfreak/base" 7 ], 8 "overrides": [ 9 // if you need other unrelated overrides, add them first 10 { 11 "files": ["*.js"], 12 "rules": { 13 "semi": ["error", "always"] 14 } 15 }, 16 { 17 "files": ["*.ts"], 18 "extends": [ 19 "some-unrelated-config", 20 // apply @neatfreak configs after unrelated configs 21 "plugin:@neatfreak/typescript" 22 ], 23 "rules": { 24 "@typescript-eslint/semi": ["error", "always"], 25 "@typescript-eslint/init-declarations": "off" 26 } 27 }, 28 { 29 "files": ["**/__tests__/**"], 30 // base config will get applied by above overrides 31 "extends": ["plugin:@neatfreak/jest"], 32 "rules": { 33 "jest/no-if": "warn" 34 } 35 }, 36 // Apply last when using Prettier config 37 { 38 "files": ["*.?(ts,js)"], 39 "extends": ["plugin:@neatfreak/prettier"] 40 } 41 ] 42}
Applies configs automatically wrapped in an override
with a default files
glob.
1{ 2 "plugins": ["@neatfreak"], 3 "extends": [ 4 "some-unrelated-config", 5 // apply @neatfreak configs after unrelated configs 6 "plugin:@neatfreak/base", 7 // applied using pattern matching 8 "plugin:@neatfreak/jest auto", 9 "plugin:@neatfreak/typescript auto", 10 // applied globally 11 "plugin:@neatfreak/prettier" 12 ], 13 // example rules overrides 14 "rules": { 15 "semi": ["error", "always"], 16 "@typescript-eslint/semi": ["error", "always"], 17 "@typescript-eslint/init-declarations": "off", 18 "jest/no-if": "warn" 19 } 20}
Note: the
prettier
,node
, andcli
configs do not have an "auto" config, as these don't typically require an override.
Automatically applies everything.
Note: requires installing all optional peer dependencies (see Usage)
1{ 2 "plugins": ["@neatfreak"], 3 "extends": ["plugin:@neatfreak/lazy"], 4 // example rules overrides 5 "rules": { 6 "semi": ["error", "always"], 7 "@typescript-eslint/semi": ["error", "always"], 8 "@typescript-eslint/init-declarations": "off", 9 "jest/no-if": "warn" 10 } 11}
No vulnerabilities found.
No security vulnerabilities found.