eslint-config-oats
Version:
An eslint config that nourishes and gets you ready for the day.
83 lines (82 loc) • 2.46 kB
JavaScript
module.exports = {
env: {
es6: true,
},
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module',
},
plugins: ['import'],
settings: {
'import/ignore': ['node_modules', '.json$', '.(scss|less|css|styl)$'],
},
rules: {
'import/default': 'error',
'import/dynamic-import-chunkname': 'off',
'import/export': 'error',
'import/exports-last': 'off',
'import/extensions': 'off',
'import/first': 'error',
'import/group-exports': 'off',
'import/max-dependencies': 'off',
'import/named': 'error',
'import/namespace': 'error',
'import/newline-after-import': 'off',
'import/no-absolute-path': 'error',
'import/no-amd': 'error',
'import/no-anonymous-default-export': 'off',
'import/no-commonjs': 'off',
'import/no-cycle': 'off', // this rule slows things down a LOT
'import/no-default-export': 'off',
'import/no-deprecated': 'warn',
'import/no-duplicates': 'error',
'import/no-dynamic-require': 'off',
'import/no-extraneous-dependencies': 'error',
'import/no-import-module-exports': 'error',
'import/no-internal-modules': 'off',
'import/no-mutable-exports': 'error',
'import/no-named-default': 'error',
'import/no-named-as-default': 'error',
'import/no-named-as-default-member': 'error',
'import/no-named-export': 'off',
'import/no-namespace': 'off',
'import/no-nodejs-modules': 'off',
'import/no-relative-packages': 'warn',
'import/no-relative-parent-imports': 'off',
'import/no-restricted-paths': 'off',
'import/no-self-import': 'error',
'import/no-unassigned-import': 'off',
'import/no-unresolved': 'error',
'import/no-unused-modules': 'off',
'import/no-useless-path-segments': 'off',
'import/no-webpack-loader-syntax': 'error',
'import/order': [
'warn',
{
groups: [
'builtin',
['external', 'internal'],
'parent',
['sibling', 'index'],
],
},
],
'import/prefer-default-export': 'off',
'import/unambiguous': 'off', // Don't fully understand
},
overrides: [
{
files: ['**/*.ts?(x)'],
extends: 'plugin:import/typescript',
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module',
},
plugins: ['@typescript-eslint'],
rules: {
'import/no-unresolved': 'off', // ts(2307)
},
},
],
}