Merged in chore/eslint9 (pull request #2029)
chore: Update to ESLint 9 * wip: apply codemod and upgrade swc plugin * Update eslint to 9 in scandic-web apply code mod to config fix existing lint issues * Remove uneccessary fixupConfigRules * Update eslint to 9 in design-system * Add lint turbo dependency * Move redis-api to eslint and prettier instead of biome * Simplify eslint configs * Clean up * Apply linting Approved-by: Linus Flood
This commit is contained in:
40
packages/design-system/eslint.config.mjs
Normal file
40
packages/design-system/eslint.config.mjs
Normal file
@@ -0,0 +1,40 @@
|
||||
import { defineConfig, globalIgnores } from 'eslint/config'
|
||||
import globals from 'globals'
|
||||
import tsParser from '@typescript-eslint/parser'
|
||||
import reactRefresh from 'eslint-plugin-react-refresh'
|
||||
import { FlatCompat } from '@eslint/eslintrc'
|
||||
import js from '@eslint/js'
|
||||
|
||||
const compat = new FlatCompat({
|
||||
recommendedConfig: js.configs.recommended,
|
||||
allConfig: js.configs.all,
|
||||
})
|
||||
|
||||
export default defineConfig([
|
||||
{
|
||||
languageOptions: {
|
||||
globals: {
|
||||
...globals.browser,
|
||||
},
|
||||
parser: tsParser,
|
||||
},
|
||||
extends: compat.extends(
|
||||
'eslint:recommended',
|
||||
'plugin:@typescript-eslint/recommended',
|
||||
'plugin:react-hooks/recommended',
|
||||
'plugin:storybook/recommended'
|
||||
),
|
||||
plugins: {
|
||||
'react-refresh': reactRefresh,
|
||||
},
|
||||
rules: {
|
||||
'react-refresh/only-export-components': [
|
||||
'warn',
|
||||
{
|
||||
allowConstantExport: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
globalIgnores(['**/dist', '**/.eslintrc.cjs']),
|
||||
])
|
||||
Reference in New Issue
Block a user