generated from TBD54566975/tbd-project-template
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cleanup unused console and update formatting (#377)
- Loading branch information
1 parent
deddbd8
commit fe0fd35
Showing
61 changed files
with
531 additions
and
1,204 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,4 +1,4 @@ | ||
src/protos/**/* | ||
dist/**/* | ||
.playwright/**/* | ||
playwright.config.ts | ||
scripts/**/* | ||
tailwind.config.js |
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,147 +1,36 @@ | ||
module.exports = { | ||
root: true, | ||
parserOptions: { | ||
ecmaVersion: 2022, | ||
sourceType: 'module', | ||
allowImportExportEverywhere: true, | ||
project: true, | ||
tsconfigRootDir: __dirname, | ||
}, | ||
parser: '@typescript-eslint/parser', | ||
env: { | ||
browser: true, | ||
node: true, | ||
es6: true, | ||
mocha: true, | ||
}, | ||
globals: { | ||
convertStoriesToJestCases: 'readonly', | ||
}, | ||
plugins: ['react'], | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:compat/recommended', | ||
'plugin:@typescript-eslint/recommended-type-checked', | ||
'prettier', | ||
], | ||
ignorePatterns: ['**/dist/*'], | ||
rules: { | ||
strict: 0, | ||
/* START: Prettier equivalent rules */ | ||
'max-len': [ | ||
'error', | ||
{ | ||
ignoreComments: true, | ||
tabWidth: 2, // Prettier:Tab Width | ||
ignoreTemplateLiterals: true, | ||
code: 180, // Prettier:Max length | ||
}, | ||
], | ||
'no-tabs': ['error'], // Prettier: Tabs | ||
semi: ['error', 'never'], // Prettier: Semicolons | ||
quotes: [ | ||
'error', | ||
'single', | ||
{ | ||
// Prettier: Quotes | ||
avoidEscape: true, | ||
allowTemplateLiterals: true, | ||
}, | ||
], | ||
'quote-props': ['error', 'as-needed'], // Prettier: Quote Props | ||
'comma-dangle': [ | ||
'error', | ||
{ | ||
// Prettier: Trailing Commas | ||
arrays: 'always-multiline', | ||
objects: 'always-multiline', | ||
imports: 'always-multiline', | ||
exports: 'always-multiline', | ||
functions: 'never', | ||
}, | ||
], | ||
'array-bracket-spacing': ['error', 'never'], // Prettier: Bracket Spacing | ||
'object-curly-spacing': ['error', 'never'], // Prettier: Bracket Spacing | ||
'arrow-parens': ['error', 'as-needed'], // Prettier: Arrow Function Parentheses | ||
'eol-last': ['error'], // Prettier: End of Line | ||
// Prettier: JSX | ||
'jsx-quotes': ['error', 'prefer-single'], // Prettier: JSX Quotes | ||
'react/jsx-tag-spacing': ['error'], // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-tag-spacing.md | ||
'react/jsx-closing-bracket-location': ['error', 'line-aligned'], // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-closing-bracket-location.md | ||
'react/jsx-indent-props': [2, 2], // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-indent-props.md | ||
/* END: Prettier equivalent rules */ | ||
/* Start: JS/TS quality rules */ | ||
'react/jsx-key': [ | ||
'error', | ||
{ | ||
checkFragmentShorthand: true, | ||
checkKeyMustBeforeSpread: false, | ||
warnOnDuplicates: true, | ||
}, | ||
], // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-key.md | ||
'no-prototype-builtins': 0, | ||
'func-names': [ | ||
'error', | ||
'always', | ||
{ | ||
generators: 'never', | ||
}, | ||
], | ||
'no-console': [ | ||
'error', | ||
{ | ||
allow: ['warn', 'error'], | ||
}, | ||
], | ||
'no-return-assign': ['error'], | ||
'class-methods-use-this': [ | ||
'error', | ||
{ | ||
exceptMethods: ['render'], | ||
}, | ||
], | ||
'no-use-before-define': ['error'], | ||
'no-unneeded-ternary': ['error'], | ||
'@typescript-eslint/no-use-before-define': ['error'], | ||
'@typescript-eslint/ban-ts-comment': [ | ||
2, | ||
{ | ||
'ts-ignore': 'allow-with-description', | ||
}, | ||
], | ||
'@typescript-eslint/no-unused-vars': [ | ||
'error', | ||
{argsIgnorePattern: '^_', varsIgnorePattern: '^_'}, | ||
], | ||
/* End: JS/TS quality rules */ | ||
es2021: true, | ||
}, | ||
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'plugin:react/recommended', 'prettier'], | ||
overrides: [ | ||
{ | ||
files: ['**/*.spec.*'], | ||
extends: ['plugin:@typescript-eslint/disable-type-checked'], | ||
rules: { | ||
'func-names': 0, | ||
'no-console': 0, | ||
'no-shadow': 0, | ||
'no-return-assign': 0, | ||
'no-global-assign': 0, | ||
'@typescript-eslint/no-non-null-assertion': 0, | ||
env: { | ||
node: true, | ||
}, | ||
}, | ||
{ | ||
files: ['**/*.svg.tsx'], | ||
rules: { | ||
'max-len': 0, | ||
}, | ||
}, | ||
{ | ||
files: ['**/*.cjs', '**/*.js'], | ||
extends: ['plugin:@typescript-eslint/disable-type-checked'], | ||
rules: { | ||
'@typescript-eslint/no-var-requires': 0, | ||
'no-undef': 0, | ||
'func-names': 0, | ||
files: ['.eslintrc.{js,cjs}'], | ||
parserOptions: { | ||
sourceType: 'script', | ||
}, | ||
}, | ||
], | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
ecmaVersion: 'latest', | ||
sourceType: 'module', | ||
}, | ||
plugins: ['@typescript-eslint', 'react'], | ||
rules: { | ||
'react/react-in-jsx-scope': 'off', | ||
'react/jsx-uses-react': 'off', | ||
'func-style': ['error', 'expression'], | ||
'@typescript-eslint/consistent-type-definitions': ['error', 'interface'], | ||
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }], | ||
}, | ||
settings: { | ||
react: { | ||
version: 'detect', | ||
}, | ||
}, | ||
} |
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 |
---|---|---|
@@ -1,2 +1,4 @@ | ||
import '@testing-library/jest-dom/jest-globals' | ||
import * as React from 'react' | ||
import './expect-no-interdependencies.js' | ||
|
||
global.React = React |
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,2 @@ | ||
src/protos/**/* | ||
dist/**/* | ||
.playwright/**/* |
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.