mirror of
https://github.com/aleleba/create-react-ssr.git
synced 2025-07-15 09:08:32 -06:00
PR-589725: Updating packages, fixing redux actions and fixing linting.
This commit is contained in:
108
eslint.config.ts
108
eslint.config.ts
@ -4,52 +4,62 @@ import reactPlugin from 'eslint-plugin-react';
|
||||
import globals from 'globals';
|
||||
|
||||
export default tseslint.config(
|
||||
eslint.configs.recommended,
|
||||
...tseslint.configs.recommended,
|
||||
{
|
||||
files: ['**/*.{js,jsx,ts,tsx}'],
|
||||
ignores: [
|
||||
'build/',
|
||||
'webpack.config.ts',
|
||||
'webpack.config.dev.ts',
|
||||
'webpack.config.dev.server.ts',
|
||||
'webpack.cy.config.ts',
|
||||
'service-worker.ts',
|
||||
'serviceWorkerRegistration.ts'
|
||||
],
|
||||
languageOptions: {
|
||||
ecmaVersion: 'latest',
|
||||
sourceType: 'module',
|
||||
parser: tseslint.parser,
|
||||
parserOptions: {
|
||||
ecmaFeatures: {
|
||||
jsx: true
|
||||
},
|
||||
globals: {
|
||||
...globals.browser,
|
||||
...globals.node,
|
||||
...globals.es2021
|
||||
}
|
||||
}
|
||||
},
|
||||
plugins: {
|
||||
react: reactPlugin,
|
||||
'@typescript-eslint': tseslint.plugin
|
||||
},
|
||||
settings: {
|
||||
react: {
|
||||
version: 'detect'
|
||||
}
|
||||
},
|
||||
rules: {
|
||||
'indent': ['error', 'tab'],
|
||||
'linebreak-style': ['error', 'unix'],
|
||||
'quotes': ['error', 'single'],
|
||||
'semi': ['error', 'always'],
|
||||
'eol-last': ['error', 'always'],
|
||||
'@typescript-eslint/no-var-requires': 'off',
|
||||
// Include here the recommended rules for react
|
||||
...reactPlugin.configs.recommended.rules
|
||||
}
|
||||
}
|
||||
);
|
||||
{
|
||||
ignores: [
|
||||
'**/build/**',
|
||||
'**/webpack.config.ts',
|
||||
'**/webpack.config.dev.ts',
|
||||
'**/webpack.config.dev.server.ts',
|
||||
'**/webpack.cy.config.ts',
|
||||
'**/service-worker.ts',
|
||||
'**/serviceWorkerRegistration.ts',
|
||||
'node_modules/**'
|
||||
]
|
||||
},
|
||||
eslint.configs.recommended,
|
||||
...tseslint.configs.recommended,
|
||||
{
|
||||
files: ['**/*.{js,jsx,ts,tsx}'],
|
||||
languageOptions: {
|
||||
ecmaVersion: 'latest',
|
||||
sourceType: 'module',
|
||||
parser: tseslint.parser,
|
||||
parserOptions: {
|
||||
ecmaFeatures: {
|
||||
jsx: true
|
||||
},
|
||||
globals: {
|
||||
...globals.browser,
|
||||
...globals.node,
|
||||
...globals.es2021
|
||||
}
|
||||
}
|
||||
},
|
||||
plugins: {
|
||||
react: reactPlugin,
|
||||
'@typescript-eslint': tseslint.plugin
|
||||
},
|
||||
settings: {
|
||||
react: {
|
||||
version: 'detect'
|
||||
}
|
||||
},
|
||||
rules: {
|
||||
// Include here the recommended rules for react
|
||||
...reactPlugin.configs.recommended.rules,
|
||||
'indent': ['error', 'tab'],
|
||||
'linebreak-style': ['error', 'unix'],
|
||||
'quotes': ['error', 'single'],
|
||||
'semi': ['error', 'always'],
|
||||
'eol-last': ['error', 'always'],
|
||||
'@typescript-eslint/no-var-requires': 'off',
|
||||
'@typescript-eslint/no-require-imports': 'off',
|
||||
'no-undef': 'off',
|
||||
'@typescript-eslint/no-namespace': 'off',
|
||||
'@typescript-eslint/no-unused-vars': 'off',
|
||||
'@typescript-eslint/no-explicit-any': 'off',
|
||||
'@typescript-eslint/no-unused-expressions': 'off',
|
||||
|
||||
}
|
||||
}
|
||||
);
|
||||
|
Reference in New Issue
Block a user