mirror of
https://github.com/opentripplanner/OpenTripPlanner.git
synced 2025-06-16 05:00:35 +02:00
40 lines
1.3 KiB
JavaScript
40 lines
1.3 KiB
JavaScript
import js from '@eslint/js'
|
|
import globals from 'globals'
|
|
import react from 'eslint-plugin-react'
|
|
import reactHooks from 'eslint-plugin-react-hooks'
|
|
import reactRefresh from 'eslint-plugin-react-refresh'
|
|
import jsxA11y from 'eslint-plugin-jsx-a11y'
|
|
import importPlugin from 'eslint-plugin-import'
|
|
import tseslint from 'typescript-eslint'
|
|
import eslintConfigPrettier from "eslint-config-prettier"
|
|
|
|
export default tseslint.config(
|
|
{ ignores: ['output', 'node_modules', 'src/gql/**/*'] },
|
|
{
|
|
extends: [js.configs.recommended, ...tseslint.configs.recommended],
|
|
files: ['**/*.{ts,tsx}'],
|
|
languageOptions: {
|
|
ecmaVersion: 2020,
|
|
globals: globals.browser,
|
|
},
|
|
plugins: {
|
|
'react': react,
|
|
'react-hooks': reactHooks,
|
|
'react-refresh': reactRefresh,
|
|
'jsx-a11y': jsxA11y,
|
|
'import': importPlugin
|
|
},
|
|
rules: {
|
|
...reactHooks.configs.recommended.rules,
|
|
'react-refresh/only-export-components': [
|
|
'warn',
|
|
{ allowConstantExport: true },
|
|
],
|
|
"react/jsx-uses-react": "off",
|
|
"react/react-in-jsx-scope": "off",
|
|
'@typescript-eslint/ban-ts-comment': "off",
|
|
'@typescript-eslint/no-unused-vars': ["error", { "caughtErrors": "all", "caughtErrorsIgnorePattern": "^_" }]
|
|
},
|
|
},
|
|
eslintConfigPrettier,
|
|
)
|