-
-
Notifications
You must be signed in to change notification settings - Fork 0
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
8a73265
commit 1cefa67
Showing
4 changed files
with
1,513 additions
and
1,577 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,96 @@ | ||
import typescriptEslint from "@typescript-eslint/eslint-plugin"; | ||
import simpleImportSort from "eslint-plugin-simple-import-sort"; | ||
import unusedImports from "eslint-plugin-unused-imports"; | ||
import cypress from "eslint-plugin-cypress"; | ||
import globals from "globals"; | ||
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: ["!**/.prettierrc.js"], | ||
}, ...compat.extends( | ||
"eslint:recommended", | ||
"next", | ||
"next/core-web-vitals", | ||
"plugin:@typescript-eslint/recommended", | ||
"prettier", | ||
), { | ||
plugins: { | ||
"@typescript-eslint": typescriptEslint, | ||
"simple-import-sort": simpleImportSort, | ||
"unused-imports": unusedImports, | ||
cypress, | ||
}, | ||
|
||
languageOptions: { | ||
globals: { | ||
...globals.browser, | ||
...globals.node, | ||
React: true, | ||
JSX: true, | ||
}, | ||
}, | ||
|
||
rules: { | ||
"no-unused-vars": "off", | ||
"no-console": "warn", | ||
"@typescript-eslint/explicit-module-boundary-types": "off", | ||
"react/no-unescaped-entities": "off", | ||
"react/display-name": "off", | ||
|
||
"react/jsx-curly-brace-presence": ["warn", { | ||
props: "never", | ||
children: "never", | ||
}], | ||
|
||
"@typescript-eslint/no-unused-vars": "off", | ||
"unused-imports/no-unused-imports": "warn", | ||
|
||
"unused-imports/no-unused-vars": ["warn", { | ||
vars: "all", | ||
varsIgnorePattern: "^_", | ||
args: "after-used", | ||
argsIgnorePattern: "^_", | ||
}], | ||
|
||
"simple-import-sort/exports": "warn", | ||
|
||
"simple-import-sort/imports": ["warn", { | ||
groups: [ | ||
["^@?\\w", "^\\u0000"], | ||
["^.+\\.s?css$"], | ||
["^@/lib", "^@/hooks"], | ||
["^@/data"], | ||
["^@/components", "^@/container"], | ||
["^@/store"], | ||
["^@/"], | ||
[ | ||
"^\\./?$", | ||
"^\\.(?!/?$)", | ||
"^\\.\\./?$", | ||
"^\\.\\.(?!/?$)", | ||
"^\\.\\./\\.\\./?$", | ||
"^\\.\\./\\.\\.(?!/?$)", | ||
"^\\.\\./\\.\\./\\.\\./?$", | ||
"^\\.\\./\\.\\./\\.\\.(?!/?$)", | ||
], | ||
["^@/types"], | ||
["^"], | ||
], | ||
}], | ||
|
||
"@typescript-eslint/no-namespace": ["error", { | ||
allowDeclarations: true, | ||
}], | ||
}, | ||
}]; |
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
Oops, something went wrong.