mirror of
https://github.com/Telecominfraproject/wlan-cloud-owprov-ui.git
synced 2025-10-29 17:52:25 +00:00
87 lines
2.1 KiB
JavaScript
87 lines
2.1 KiB
JavaScript
module.exports = {
|
|
env: {
|
|
browser: true,
|
|
es2021: true,
|
|
},
|
|
parser: '@typescript-eslint/parser',
|
|
parserOptions: {
|
|
ecmaFeatures: {
|
|
jsx: true,
|
|
},
|
|
ecmaVersion: 12,
|
|
sourceType: 'module',
|
|
allowImportExportEverywhere: false,
|
|
codeFrame: false,
|
|
project: './tsconfig.json',
|
|
},
|
|
ignorePatterns: ['build/', 'dist/'],
|
|
plugins: ['import'],
|
|
extends: [
|
|
'plugin:react/recommended',
|
|
'plugin:@typescript-eslint/eslint-recommended',
|
|
'plugin:@typescript-eslint/recommended',
|
|
'airbnb',
|
|
'airbnb-typescript',
|
|
'prettier',
|
|
'plugin:import/errors',
|
|
'plugin:import/warnings',
|
|
'plugin:import/typescript',
|
|
],
|
|
plugins: ['react', '@typescript-eslint', 'prettier'],
|
|
rules: {
|
|
'import/extensions': [
|
|
'error',
|
|
'ignorePackages',
|
|
{
|
|
js: 'never',
|
|
jsx: 'never',
|
|
ts: 'never',
|
|
tsx: 'never',
|
|
},
|
|
],
|
|
'@typescript-eslint/naming-convention': [
|
|
'error',
|
|
{
|
|
selector: 'function',
|
|
format: ['PascalCase', 'camelCase'],
|
|
leadingUnderscore: 'allowSingleOrDouble',
|
|
},
|
|
],
|
|
'no-restricted-syntax': ['error', 'ForInStatement', 'LabeledStatement', 'WithStatement'],
|
|
'react/function-component-definition': [2, { namedComponents: 'arrow-function' }],
|
|
'import/order': [
|
|
'error',
|
|
{
|
|
alphabetize: {
|
|
order: 'asc',
|
|
caseInsensitive: true,
|
|
},
|
|
'newlines-between': 'never',
|
|
groups: ['builtin', 'external', 'parent', 'sibling', 'index'],
|
|
pathGroups: [
|
|
{
|
|
pattern: 'react',
|
|
group: 'external',
|
|
position: 'before',
|
|
},
|
|
],
|
|
pathGroupsExcludedImportTypes: ['builtin'],
|
|
},
|
|
],
|
|
'max-len': ['error', { code: 150 }],
|
|
'@typescript-eslint/ban-ts-comment': ['off'],
|
|
'react/prop-types': ['warn'],
|
|
'react/require-default-props': 'off',
|
|
'react/jsx-props-no-spreading': ['off'],
|
|
'react/jsx-curly-newline': 'off',
|
|
'no-underscore-dangle': 'off',
|
|
},
|
|
settings: {
|
|
'import/resolver': {
|
|
node: {
|
|
paths: ['src'],
|
|
},
|
|
},
|
|
},
|
|
};
|