Archived
56 lines
1.3 KiB
JavaScript
56 lines
1.3 KiB
JavaScript
module.exports = {
|
|
root: true,
|
|
extends: [
|
|
'eslint:recommended',
|
|
'plugin:react/recommended',
|
|
'plugin:react-hooks/recommended',
|
|
'plugin:react/jsx-runtime',
|
|
'xo',
|
|
'xo-typescript',
|
|
'xo-typescript/space',
|
|
'prettier',
|
|
'plugin:@typescript-eslint/recommended',
|
|
],
|
|
plugins: ['react', 'react-hooks', '@typescript-eslint', 'prettier'],
|
|
rules: {
|
|
'@typescript-eslint/indent': 'off',
|
|
'@typescript-eslint/object-curly-spacing': 'off',
|
|
'@typescript-eslint/strict-boolean-expressions': ['error', { allowString: false, allowNumber: false }],
|
|
'@typescript-eslint/ban-types': 'off',
|
|
eqeqeq: ['error', 'always'],
|
|
'linebreak-style': 'off',
|
|
'prettier/prettier': [
|
|
'error',
|
|
{
|
|
singleQuote: true,
|
|
useTabs: false,
|
|
endOfLine: 'lf',
|
|
printWidth: 120,
|
|
trailingComma: 'es5',
|
|
semi: true,
|
|
jsxSingleQuote: true,
|
|
arrowParens: 'always',
|
|
tabWidth: 2,
|
|
},
|
|
],
|
|
},
|
|
env: {
|
|
browser: true,
|
|
es2021: true,
|
|
},
|
|
parser: '@typescript-eslint/parser',
|
|
parserOptions: {
|
|
ecmaFeatures: {
|
|
jsx: true,
|
|
},
|
|
ecmaVersion: 2022,
|
|
sourceType: 'module',
|
|
},
|
|
settings: {
|
|
react: {
|
|
version: '18',
|
|
},
|
|
},
|
|
ignorePatterns: ['.eslintrc.cjs', 'vite.config.ts', 'vite-env.d.ts'],
|
|
};
|