-
Notifications
You must be signed in to change notification settings - Fork 50
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
8169ed2
commit 5969ce7
Showing
4 changed files
with
190 additions
and
436 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,46 @@ | ||
const js = require("@eslint/js"); | ||
const globals = require("globals"); | ||
const typescriptEslintPlugin = require("@typescript-eslint/eslint-plugin"); | ||
const typescriptEslintParser = require("@typescript-eslint/parser"); | ||
const reactEslintPlugin = require("eslint-plugin-react"); | ||
const prettierConfig = require("eslint-config-prettier"); | ||
|
||
module.exports = [ | ||
js.configs.recommended, | ||
prettierConfig, | ||
{ | ||
settings: { | ||
react: { | ||
version: "detect", | ||
}, | ||
}, | ||
languageOptions: { | ||
globals: globals.node, | ||
ecmaVersion: 2021, | ||
sourceType: "module", | ||
parser: typescriptEslintParser, | ||
// Assuming globals is correctly imported above; otherwise, specify globals manually | ||
}, | ||
plugins: { | ||
"react": reactEslintPlugin, | ||
"@typescript-eslint": typescriptEslintPlugin, | ||
}, | ||
rules: { | ||
// suppress errors for missing 'import React' in files | ||
"react/react-in-jsx-scope": "off", | ||
// allow jsx syntax in js files (for next.js project) | ||
"react/jsx-filename-extension": ["warn", { extensions: [".js", ".jsx", ".ts", ".tsx"] }], | ||
"react-hooks/exhaustive-deps": "off", | ||
"@typescript-eslint/ban-ts-comment": "off", | ||
"@typescript-eslint/explicit-member-accessibility": "off", | ||
"@typescript-eslint/explicit-function-return-type": "off", | ||
"@typescript-eslint/no-explicit-any": "off", | ||
"@typescript-eslint/no-use-before-define": "off", | ||
"@typescript-eslint/no-unused-vars": "error", | ||
"no-console": ["error", { allow: ["warn", "error"] }], | ||
"react/prop-types": 1, | ||
"no-unused-vars": "off", | ||
"no-empty-pattern": "off", | ||
}, | ||
}, | ||
]; |
Oops, something went wrong.