dry-wash-pl/eslint.config.mjs

53 lines
1.3 KiB
JavaScript
Raw Permalink Normal View History

2025-02-02 13:52:22 +03:00
import globals from 'globals';
import pluginJs from '@eslint/js';
import tseslint from 'typescript-eslint';
import pluginReact from 'eslint-plugin-react';
2024-11-03 12:23:47 +03:00
import stylistic from '@stylistic/eslint-plugin';
import pluginImport from 'eslint-plugin-import';
2024-11-03 12:23:47 +03:00
export default [
2025-02-02 13:52:22 +03:00
{ files: ['**/*.{js,mjs,cjs,ts,jsx,tsx}'] },
2024-11-03 12:23:47 +03:00
{ languageOptions: { globals: globals.browser } },
pluginJs.configs.recommended,
...tseslint.configs.recommended,
pluginReact.configs.flat.recommended,
{
plugins: {
'@stylistic': stylistic,
2025-02-02 13:52:22 +03:00
import: pluginImport,
2024-11-03 12:23:47 +03:00
},
2025-02-02 13:52:22 +03:00
rules: {
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': [
'warn', // or "error"
2024-11-03 12:23:47 +03:00
{
2025-02-02 13:52:22 +03:00
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^_',
},
2024-11-03 12:23:47 +03:00
],
2025-02-02 13:52:22 +03:00
'sort-imports': ['off'],
'import/order': [
'error',
{
2025-02-02 13:52:22 +03:00
groups: [
'builtin',
'external',
'internal',
'parent',
['sibling', 'index'],
],
2025-02-02 13:52:22 +03:00
'newlines-between': 'always',
},
],
2025-02-02 13:52:22 +03:00
semi: ['error', 'always'],
2024-11-03 12:23:47 +03:00
'@stylistic/indent': ['error', 2],
2025-02-02 13:52:22 +03:00
'react/prop-types': 'off',
2024-11-03 12:23:47 +03:00
},
2025-02-02 13:52:22 +03:00
},
{
ignores: ['babel.config.js'],
},
2024-11-03 12:23:47 +03:00
];