* Add "no-relative-import-paths" eslint plugin * Add "no-relative-import-paths" eslint plugin - Fix imports
37 lines
902 B
JavaScript
37 lines
902 B
JavaScript
module.exports = {
|
|
extends: [
|
|
'airbnb',
|
|
'airbnb-typescript'
|
|
],
|
|
plugins: ['@typescript-eslint', 'no-relative-import-paths'],
|
|
parserOptions: {
|
|
project: './tsconfig.json',
|
|
},
|
|
rules: {
|
|
// Indent with 4 spaces
|
|
'@typescript-eslint/indent': ['error', 4],
|
|
|
|
// Indent JSX with 4 spaces
|
|
'react/jsx-indent': ['error', 4],
|
|
|
|
// Indent props with 4 spaces
|
|
'react/jsx-indent-props': ['error', 4],
|
|
|
|
'no-plusplus': ['error', { 'allowForLoopAfterthoughts': true }],
|
|
|
|
|
|
// just why
|
|
'react/jsx-no-bind' : 'off',
|
|
'react/jsx-props-no-spreading': 'off',
|
|
'react/require-default-props': 'off',
|
|
|
|
"no-relative-import-paths/no-relative-import-paths": [
|
|
"error",
|
|
{
|
|
rootDir: "src",
|
|
prefix: false,
|
|
},
|
|
],
|
|
},
|
|
};
|