@wakamsha/eslint-config
Version:
wakamsha's ESLint rules as an extensible shared config.
25 lines (19 loc) • 731 B
JavaScript
// @ts-check
import n from 'eslint-plugin-n';
export default {
plugins: {
n,
},
rules: {
...n.configs['flat/recommended'].rules,
// require all requires be top-level
// https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/global-require.md
'n/global-require': ['error'],
// disallow use of new operator with the require function
// https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/no-new-require.md
'n/no-new-require': ['error'],
// disallow string concatenation with __dirname and __filename
// https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/no-path-concat.md
'n/no-path-concat': ['error'],
},
};