-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from denmo530/feature/SCRUM-13-SCRUM-14-husky-l…
…int-setup Feature/scrum 13 scrum 14 husky lint setup
- Loading branch information
Showing
70 changed files
with
2,901 additions
and
1,024 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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/coverage | ||
/dist | ||
/examples | ||
/node_modules |
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,3 +1,87 @@ | ||
{ | ||
"extends": "next/core-web-vitals" | ||
"extends": [ | ||
"next/core-web-vitals", | ||
"airbnb", | ||
"airbnb-typescript", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:@typescript-eslint/recommended-requiring-type-checking", | ||
"plugin:react/recommended", | ||
"plugin:prettier/recommended", | ||
"prettier" | ||
], | ||
"plugins": ["import", "jsx-a11y", "react", "react-hooks", "@typescript-eslint"], | ||
"env": { | ||
"node": true, | ||
"browser": true | ||
}, | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"project": "./tsconfig.json" | ||
}, | ||
"rules": { | ||
"no-var": "warn", | ||
"vars-on-top": "warn", | ||
"jsx-a11y/no-static-element-interactions": "off", | ||
"jsx-a11y/click-events-have-key-events": "off", | ||
"@typescript-eslint/no-unsafe-return": "off", | ||
|
||
// Too restrictive, writing ugly code to defend against a very unlikely scenario: https://eslint.org/docs/rules/no-prototype-builtins | ||
"no-prototype-builtins": "off", | ||
// https://basarat.gitbooks.io/typescript/docs/tips/defaultIsBad.html | ||
"import/prefer-default-export": "off", | ||
"import/no-default-export": "off", | ||
// Too restrictive: https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/destructuring-assignment.md | ||
"react/destructuring-assignment": "off", | ||
// No jsx extension: https://github.com/facebook/create-react-app/issues/87#issuecomment-234627904 | ||
"react/jsx-filename-extension": "off", | ||
"react/require-default-props": "off", | ||
"react/function-component-definition": "off", | ||
"react/no-unstable-nested-components": "off", | ||
// Use function hoisting to improve code readability | ||
"no-use-before-define": ["error", { "functions": false, "classes": true, "variables": true }], | ||
// Allow most functions to rely on type inference. If the function is exported, then `@typescript-eslint/explicit-module-boundary-types` will ensure it's typed. | ||
"@typescript-eslint/explicit-function-return-type": "off", | ||
"@typescript-eslint/no-misused-promises": "off", | ||
"no-unsafe-optional-chaining": "off", | ||
"@typescript-eslint/restrict-template-expressions": "off", | ||
"@typescript-eslint/no-use-before-define": [ | ||
"error", | ||
{ | ||
"functions": false, | ||
"classes": true, | ||
"variables": true, | ||
"typedefs": true | ||
} | ||
], | ||
// Common abbreviations are known and readable | ||
"unicorn/prevent-abbreviations": "off", | ||
"react/jsx-props-no-spreading": "off", | ||
// Airbnb prefers forEach | ||
|
||
"unicorn/no-array-for-each": "off", | ||
"@typescript-eslint/indent": "off", | ||
"no-nested-ternary": "off", | ||
// It's not accurate in the monorepo style | ||
"import/no-extraneous-dependencies": "off", | ||
"@typescript-eslint/comma-dangle": "off", | ||
"react/no-array-index-key": "warn", | ||
"arrow-body-style": "off", | ||
"no-unused-vars": "warn", | ||
"react/react-in-jsx-scope": "off", | ||
"@typescript-eslint/no-unsafe-assignment": "off", | ||
"@typescript-eslint/no-unsafe-member-access": "off", | ||
"jsx-a11y/label-has-associated-control": "off", | ||
"no-plusplus": "off", | ||
"no-console": "off", | ||
"import/extensions": [ | ||
"error", | ||
"ignorePackages", | ||
{ | ||
"js": "never", | ||
"jsx": "never", | ||
"ts": "never", | ||
"tsx": "never" | ||
} | ||
] | ||
} | ||
} |
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,6 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
npm run lint | ||
|
||
# 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,8 @@ | ||
{ | ||
"semi": true, | ||
"tabWidth": 2, | ||
"printWidth": 100, | ||
"singleQuote": true, | ||
"trailingComma": "none", | ||
"jsxBracketSameLine": 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
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
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
Oops, something went wrong.