Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: eslint v9 #212

Merged
merged 3 commits into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 0 additions & 58 deletions gbajs3/.eslintrc.cjs

This file was deleted.

75 changes: 75 additions & 0 deletions gbajs3/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
import js from '@eslint/js';
import tsParser from '@typescript-eslint/parser';
import importPlugin from 'eslint-plugin-import';
import jestDom from 'eslint-plugin-jest-dom';
import jsxA11Y from 'eslint-plugin-jsx-a11y';
import pluginReactHooks from 'eslint-plugin-react-hooks';
import reactRefresh from 'eslint-plugin-react-refresh';
import styledA11y from 'eslint-plugin-styled-components-a11y';
import testingLibrary from 'eslint-plugin-testing-library';
import globals from 'globals';
import tseslint from 'typescript-eslint';

export default [
js.configs.recommended,
importPlugin.flatConfigs.recommended,
jsxA11Y.flatConfigs.recommended,
styledA11y.flatConfigs.recommended,
jestDom.configs['flat/recommended'],
testingLibrary.configs['flat/dom'],
...tseslint.configs.recommended,
{
files: ['**/*.js', '**/*.ts', '**/*.tsx'],
plugins: {
'react-refresh': reactRefresh,
'react-hooks': pluginReactHooks
},

languageOptions: {
globals: {
...globals.browser
},

parser: tsParser,
ecmaVersion: 'latest',
sourceType: 'module'
},

rules: {
'@typescript-eslint/consistent-type-imports': 'error',
'react-refresh/only-export-components': 'warn',
'import/no-default-export': 'error',

'import/order': [
'error',
{
groups: [
'builtin',
'external',
'internal',
['sibling', 'parent'],
'index',
'object',
'type',
'unknown'
],

'newlines-between': 'always',

alphabetize: {
order: 'asc',
caseInsensitive: true
}
}
],

'testing-library/consistent-data-testid': [
'error',
{
testIdPattern: '^([a-z0-9]+-?:?)+$'
}
],
...pluginReactHooks.configs.recommended.rules
}
}
];
Loading