-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(eslint): Setup eslint and prettier (#6572)
* chore: remove unused utils/components/packages * initial eslint/prettier setup * merge RemoveUnusedCode * fix(linting errors): single quotes in text * Remove WhatsNewBanner * Remove WhatsNewBanner * fix(linting errors): single quotes in text * add rule to throw eslint error for react hooks dependencies instead of a warning * Remove unused InfoPopover * Remove unused InfoPopover * fix(linting errors): do not pass children as prop in Block test * fix(linting errors): fix next img warnings * fix(linting errors): missing hook dependency GetStartedPopover * fix(linting error): move handleScroll to its own useEffect w/o dependency array * fix(linting error): missing hook dependency in MDXCode * fix(linting error): order of hooks MDXLink * fix(linting error): missing hook dependency PlatformNavigator * fix(linting error): convert findRoute to hook, useRouteFinder, move to separate utils file * fix(lint errors): MenuItem and type update * fix(lint errors): make 3rd party scripts load async * fix(linting error): cleanup function in hook useTabKeyDetection * change 3rd party scripts to defer * clean up eslint warnings in next.config.mjs * use next ExportedImage instead of Image * Switch awshome_s_code to async to fix track errors * add linting to staged files with husky * update lintstagedrc * Add prettier to husky precommit * downgrade lint-staged to v14 to work with node16 * update prettierignore * ignore mdx files for now * Remove SidebarLayoutToggle * remove unified and mdx-prism * remove comments * add eslint ignore for 3rd party script we have to load sync * simplify typing for Platform
- Loading branch information
Showing
28 changed files
with
792 additions
and
647 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,7 @@ | ||
{ | ||
"extends": ["next/core-web-vitals", "prettier"], | ||
"plugins": ["prettier"], | ||
"rules": { | ||
"react-hooks/exhaustive-deps": "error" | ||
} | ||
} |
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 |
---|---|---|
|
@@ -2,3 +2,5 @@ | |
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
yarn spellcheck-diff | ||
|
||
yarn lint-staged |
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 @@ | ||
module.exports = { | ||
'**/*.(ts|tsx|js|css|mjs)': (filenames) => [ | ||
`yarn eslint ${filenames.join(' ')}`, | ||
`yarn prettier --write ${filenames.join(' ')}` | ||
] | ||
}; |
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 +1,12 @@ | ||
docs | ||
.github | ||
.husky | ||
.next | ||
.vscode | ||
client | ||
node_modules | ||
public | ||
README-assets | ||
yarn.lock | ||
redirects.json | ||
*.md | ||
*.mdx |
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 |
---|---|---|
|
@@ -10,4 +10,4 @@ | |
"tabWidth": 2, | ||
"trailingComma": "none", | ||
"useTabs": false | ||
} | ||
} |
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 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 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.