73 lines
1.9 KiB
JavaScript
73 lines
1.9 KiB
JavaScript
/** @type {import("eslint").Linter.Config} */
|
|
const config = {
|
|
root: true,
|
|
env: {
|
|
node: true,
|
|
jest: true,
|
|
},
|
|
parser: '@typescript-eslint/parser',
|
|
parserOptions: {
|
|
project: 'tsconfig.json',
|
|
tsconfigRootDir: __dirname,
|
|
sourceType: 'module',
|
|
},
|
|
plugins: ['@typescript-eslint/eslint-plugin'],
|
|
extends: [
|
|
'eslint:recommended',
|
|
'plugin:@typescript-eslint/recommended',
|
|
'plugin:@typescript-eslint/recommended-requiring-type-checking',
|
|
'plugin:@typescript-eslint/strict',
|
|
'plugin:import/recommended',
|
|
'plugin:import/typescript',
|
|
'prettier',
|
|
'plugin:react/recommended',
|
|
'plugin:react-hooks/recommended',
|
|
],
|
|
rules: {
|
|
'@typescript-eslint/no-empty-function': 'off',
|
|
'@typescript-eslint/require-await': 'off',
|
|
'@typescript-eslint/consistent-type-definitions': ['warn', 'type'],
|
|
'@typescript-eslint/no-extraneous-class': 'off',
|
|
'@typescript-eslint/no-unsafe-assignment': 'off',
|
|
'@typescript-eslint/no-unsafe-member-access': 'off',
|
|
'@typescript-eslint/no-unsafe-call': 'off',
|
|
'@typescript-eslint/no-useless-constructor': 'off',
|
|
'@typescript-eslint/no-floating-promises': 'off',
|
|
'@typescript-eslint/no-unnecessary-condition': 'off',
|
|
'@typescript-eslint/no-misused-promises': 'off',
|
|
'react/react-in-jsx-scope': 'off',
|
|
|
|
'import/no-unresolved': 'off',
|
|
|
|
'sort-imports': [
|
|
'error',
|
|
{
|
|
ignoreCase: false,
|
|
ignoreDeclarationSort: true,
|
|
ignoreMemberSort: false,
|
|
memberSyntaxSortOrder: ['none', 'all', 'multiple', 'single'],
|
|
allowSeparatedGroups: true,
|
|
},
|
|
],
|
|
'import/order': [
|
|
'error',
|
|
{
|
|
'newlines-between': 'always',
|
|
alphabetize: {
|
|
order: 'asc',
|
|
caseInsensitive: true,
|
|
},
|
|
},
|
|
],
|
|
},
|
|
ignorePatterns: [
|
|
'.eslintrc.js',
|
|
'node_modules/**',
|
|
'dist/**',
|
|
'build/**',
|
|
'main.js',
|
|
],
|
|
}
|
|
|
|
module.exports = config
|