-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6321a31
commit e6bcd39
Showing
6 changed files
with
2,182 additions
and
6,191 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
import react from 'eslint-plugin-react'; | ||
import reactHooks from 'eslint-plugin-react-hooks'; | ||
import typescriptEslint from '@typescript-eslint/eslint-plugin'; | ||
import { fixupPluginRules } from '@eslint/compat'; | ||
import globals from 'globals'; | ||
import tsParser from '@typescript-eslint/parser'; | ||
import path from 'node:path'; | ||
import { fileURLToPath } from 'node:url'; | ||
import js from '@eslint/js'; | ||
import { FlatCompat } from '@eslint/eslintrc'; | ||
|
||
const __filename = fileURLToPath(import.meta.url); | ||
const __dirname = path.dirname(__filename); | ||
const compat = new FlatCompat({ | ||
baseDirectory: __dirname, | ||
recommendedConfig: js.configs.recommended, | ||
allConfig: js.configs.all, | ||
}); | ||
|
||
export default [ | ||
{ | ||
ignores: ['build/**/*'], | ||
}, | ||
...compat.extends('eslint:recommended', 'plugin:react/recommended', 'plugin:@typescript-eslint/recommended', 'prettier'), | ||
{ | ||
plugins: { | ||
react, | ||
'react-hooks': fixupPluginRules(reactHooks), | ||
'@typescript-eslint': typescriptEslint, | ||
}, | ||
|
||
languageOptions: { | ||
globals: { | ||
...globals.browser, | ||
}, | ||
|
||
parser: tsParser, | ||
ecmaVersion: 'latest', | ||
sourceType: 'module', | ||
}, | ||
|
||
settings: { | ||
react: { | ||
createClass: 'createReactClass', | ||
pragma: 'React', | ||
fragment: 'Fragment', | ||
version: 'detect', | ||
}, | ||
|
||
componentWrapperFunctions: ['styled'], | ||
}, | ||
|
||
rules: { | ||
'@typescript-eslint/no-non-null-assertion': 0, | ||
'@typescript-eslint/no-unused-vars': 0, | ||
'react/prop-types': 0, | ||
}, | ||
}, | ||
]; |
Oops, something went wrong.