answer/ui/.eslintrc.js

91 lines
2.3 KiB
JavaScript
Raw Normal View History

2022-09-27 17:59:05 +08:00
module.exports = {
root: true,
2022-09-27 17:59:05 +08:00
env: {
browser: true,
es2021: true,
},
extends: [
'react-app',
'react-app/jest',
'airbnb',
'airbnb-typescript',
'plugin:import/typescript',
'plugin:prettier/recommended',
],
overrides: [],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 'latest',
sourceType: 'module',
tsconfigRootDir: __dirname,
project: ['./tsconfig.json'],
2022-09-27 17:59:05 +08:00
},
2022-11-21 17:58:57 +08:00
plugins: ['react', '@typescript-eslint', 'prettier'],
2022-09-27 17:59:05 +08:00
rules: {
2022-11-21 17:58:57 +08:00
'prettier/prettier': 'error',
2022-09-27 17:59:05 +08:00
'no-unused-vars': 'off',
'no-console': 'off',
'import/prefer-default-export': 'off',
'no-param-reassign': 'off',
'react/react-in-jsx-scope': 'off',
'react/function-component-definition': 'off',
'react/button-has-type': 'off',
'react/no-unescaped-entities': 'off',
'react/require-default-props': 'off',
'arrow-body-style': 'off',
'react/prop-types': 0,
'react/no-danger': 'off',
'jsx-a11y/no-static-element-interactions': 'off',
'jsx-a11y/label-has-associated-control': 'off',
'jsx-a11y/tabindex-no-positive': 'off',
'func-names': 'off',
'no-alert': 'off',
'prefer-promise-reject-errors': 'off',
'@typescript-eslint/naming-convention': 'off',
'no-debugger': 'off',
'max-len': 'off',
'import/extensions': 'off',
'react-hooks/exhaustive-deps': 'off',
'react/jsx-props-no-spreading': 'off',
'@typescript-eslint/default-param-last': 'off',
'import/order': [
'error',
{
groups: [
'builtin',
'external',
['internal', 'parent', 'sibling', 'index'],
'unknown',
],
pathGroups: [
{
pattern: 'react*',
group: 'external',
position: 'before',
},
{
pattern: '@/**',
2022-09-27 17:59:05 +08:00
group: 'internal',
},
{
pattern: './**',
group: 'internal',
position: 'after',
},
{
pattern: '*.scss',
patternOptions: { matchBase: true },
group: 'unknown',
position: 'after',
},
],
pathGroupsExcludedImportTypes: ['react'],
'newlines-between': 'always',
},
],
},
};