-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Configure ESLint and Git Pre commit hook
- configure eslint and prettier format Delivers #187419115
- Loading branch information
Showing
19 changed files
with
5,511 additions
and
969 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,71 @@ | ||
module.exports = { | ||
root: true, | ||
env: { browser: true, es2020: true }, | ||
env: { | ||
browser: true, | ||
es2020: true, | ||
node: true, | ||
}, | ||
extends: [ | ||
"eslint:recommended", | ||
"airbnb", | ||
"airbnb-typescript", | ||
"airbnb/hooks", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:react-hooks/recommended", | ||
], | ||
ignorePatterns: ["dist", ".eslintrc.cjs"], | ||
parser: "@typescript-eslint/parser", | ||
parserOptions: { | ||
project: "./tsconfig.eslint.json", | ||
}, | ||
plugins: ["react-refresh"], | ||
rules: { | ||
"react/react-in-jsx-scope": "off", | ||
"react/function-component-definition": [ | ||
"warn", | ||
{ | ||
namedComponents: "arrow-function", | ||
unnamedComponents: "arrow-function", | ||
}, | ||
], | ||
"no-undef": "off", | ||
"react-refresh/only-export-components": [ | ||
"warn", | ||
{ allowConstantExport: true }, | ||
], | ||
"@typescript-eslint/quotes": ["off"], | ||
"arrow-body-style": ["warn", "as-needed"], | ||
"import/order": [ | ||
"warn", | ||
{ | ||
groups: [ | ||
"builtin", | ||
"external", | ||
"internal", | ||
"parent", | ||
"sibling", | ||
"index", | ||
], | ||
"newlines-between": "always", | ||
}, | ||
], | ||
"@typescript-eslint/comma-dangle": ["warn", "always-multiline"], | ||
"import/no-extraneous-dependencies": [ | ||
"error", | ||
{ | ||
devDependencies: [ | ||
"vite.config.ts", | ||
"postcss.config.js", | ||
"tailwind.config.js", | ||
], | ||
}, | ||
], | ||
"import/extensions": ["off"], | ||
}, | ||
settings: { | ||
"import/resolver": { | ||
node: { | ||
extensions: [".js", ".jsx", ".ts", ".tsx"], | ||
}, | ||
}, | ||
}, | ||
}; |
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 @@ | ||
_ |
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,4 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
npm run test |
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,10 @@ | ||
{ | ||
"tabWidth": 2, | ||
"useTabs": false, | ||
"singleQuote": false, | ||
"semi": true, | ||
"bracketSpacing": true, | ||
"arrowParens": "always", | ||
"bracketSameLine": true, | ||
"endOfLine": "auto" | ||
} |
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,9 @@ | ||
eslint: | ||
enabled: true | ||
file_patterns: | ||
- "*.js" | ||
- "*.ts" | ||
enabled_plugins: | ||
- eslint-plugin-import | ||
- eslint-plugin-prettier | ||
- eslint-plugin:@typescript-eslint |
Oops, something went wrong.