59 lines
1.3 KiB
JavaScript
59 lines
1.3 KiB
JavaScript
const path = require('path');
|
|
|
|
module.exports = {
|
|
env: {
|
|
browser: true,
|
|
es6: true,
|
|
jest: true,
|
|
},
|
|
extends: ['airbnb'],
|
|
globals: {
|
|
Atomics: 'readonly',
|
|
SharedArrayBuffer: 'readonly',
|
|
},
|
|
parser: '@typescript-eslint/parser',
|
|
parserOptions: {
|
|
ecmaFeatures: {
|
|
jsx: true,
|
|
},
|
|
ecmaVersion: 2018,
|
|
sourceType: 'module',
|
|
},
|
|
settings: {
|
|
'import/resolver': {
|
|
node: {
|
|
extensions: ['.js', '.jsx', '.ts', '.tsx'],
|
|
paths: [path.resolve(__dirname)],
|
|
},
|
|
},
|
|
},
|
|
overrides: [
|
|
{
|
|
files: ['**/*.tsx'],
|
|
rules: {
|
|
'react/prop-types': 'off',
|
|
},
|
|
},
|
|
],
|
|
plugins: ['react', '@typescript-eslint'],
|
|
rules: {
|
|
'react/jsx-filename-extension': [1, { extensions: ['.js', '.jsx', '.ts', '.tsx'] }],
|
|
'react/jsx-one-expression-per-line': 0,
|
|
'@typescript-eslint/explicit-function-return-type': ['error'],
|
|
'max-len': ['error', 120],
|
|
'implicit-arrow-linebreak': 0,
|
|
'function-paren-newline': 0,
|
|
'no-confusing-arrow': 0,
|
|
'react/jsx-props-no-spreading': 0,
|
|
'no-unused-vars': 'off',
|
|
'@typescript-eslint/no-unused-vars': [
|
|
'error',
|
|
{
|
|
vars: 'all',
|
|
args: 'after-used',
|
|
ignoreRestSiblings: false,
|
|
},
|
|
],
|
|
},
|
|
};
|