Skip to content

Commit

Permalink
[_] chore: lint (#233)
Browse files Browse the repository at this point in the history
  • Loading branch information
JoanVicens authored May 3, 2023
1 parent 3bcf930 commit 35ac592
Show file tree
Hide file tree
Showing 216 changed files with 14,517 additions and 14,806 deletions.
62 changes: 28 additions & 34 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,40 +1,34 @@
module.exports = {
extends: 'erb',
extends: ['@internxt/eslint-config-internxt'],
overrides: [
{
files: ['*.ts', '*.tsx'],
parserOptions: {
project: ['./tsconfig.json'],
},
env: {
jest: true,
},
},
],
rules: {
// A temporary hack related to IDE not resolving correct package.json
'import/no-extraneous-dependencies': 'off',
'import/no-unresolved': 'error',
// Since React 17 and typescript 4.1 you can safely disable the rule
'react/react-in-jsx-scope': 'off',
'global-require': 'off',
'react/require-default-props': 'off',
'no-nested-ternary': 'off',
'no-restricted-syntax': 'off',
'promise/catch-or-return': 'off',
'import/prefer-default-export': 'off',
'class-methods-use-this': 'off',
'@typescript-eslint/no-use-before-define': 'off',
'@typescript-eslint/no-loop-func': 'off',
'react-hooks/exhaustive-deps': 'off',
'no-await-in-loop': 'off',
'no-bitwise': 'off',
'max-classes-per-file': 'off',
'import/no-cycle': 'off',
'consistent-return': 'off',
'no-plusplus': 'off',
'promise/always-return': 'off',
'no-else-return': 'off',
'no-async-promise-executor': 'off',
'react/jsx-no-bind': 'off',
'react/jsx-props-no-spreading': 'off',
},
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module',
project: './tsconfig.json',
tsconfigRootDir: __dirname,
createDefaultProgram: true,
'no-await-in-loop': 'warn',
'no-use-before-define': 'warn',
'array-callback-return': 'warn',
'max-len': [
'error',
{
code: 120,
ignorePattern: '^it',
ignoreUrls: true,
ignoreStrings: true,
ignoreTemplateLiterals: true,
},
],
'@typescript-eslint/ban-ts-comment': 'warn',
'no-async-promise-executor': 'warn',
},
parser: '@typescript-eslint/parser',
settings: {
'import/resolver': {
// See https://github.com/benmosher/eslint-plugin-import/issues/1396#issuecomment-575727774 for line below
Expand Down
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged
npx yarn run lint
20 changes: 16 additions & 4 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@
".prettierrc": "jsonc",
".eslintignore": "ignore"
},

"javascript.validate.enable": false,
"javascript.format.enable": false,
"typescript.format.enable": false,

"search.exclude": {
".git": true,
".eslintcache": true,
Expand All @@ -19,5 +17,19 @@
"test/**/__snapshots__": true,
"package-lock.json": true,
"*.{css,sass,scss}.d.ts": true
}
}
},
"typescript.tsdk": "node_modules/typescript/lib",
"eslint.options": {
"overrideConfigFile": ".eslintrc.js"
},
"editor.formatOnPaste": true,
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true,
"source.fixAll.format": true
},
"[jsonc]": {
"editor.defaultFormatter": "vscode.json-language-features"
},
}
Loading

0 comments on commit 35ac592

Please sign in to comment.