Install @nf-team/eslint-config
dependency
npm install --save-dev @nf-team/eslint-config
Add @nf-team/eslint-config
to extends
in your .eslintrc
module.exports = {
// ...
extends: ['@nf-team/eslint-config'],
rules: {
// ...
},
};
- eslint-config-airbnb
- eslint-config-airbnb-typescript
- eslint-plugin-react
- eslint-plugin-react-hooks
- eslint-plugin-simple-import-sort
- eslint-plugin-unused-imports
This is the default value for the groups
option:
[
// Side effect imports.
['^\\u0000'],
// Node.js builtins. You could also generate this regex if you use a `.js` config.
// For example: `^(${require("module").builtinModules.join("|")})(/|$)`
// OR Node.js builtins prefixed with `node:`.
['^(assert|buffer|child_process|cluster|console|constants|crypto|dgram|dns|domain|events|fs|http|https|module|net|os|path|punycode|querystring|readline|repl|stream|string_decoder|sys|timers|tls|tty|url|util|vm|zlib|freelist|v8|process|async_hooks|http2|perf_hooks)(/.*|$)', '^node:'],
// Packages. `react` related packages
['^react'],
// Packages. Things that start with a letter (or digit or underscore), or `@` followed by a letter.
['^@?\\w'],
// Parent imports. Put `..` last.
['^\\.\\.(?!/?$)', '^\\.\\./?$'],
// Other relative imports. Put same-folder imports and `.` last.
['^\\./(?=.*/)(?!/?$)', '^\\.(?!/?$)', '^\\./?$'],
// Svg file imports.
['^.+\\.svg$'],
// Style imports.
['^.+\\.s?css$'],
]
This libraries is MIT licensed.