From 57ac3389f19ba5ca0b41b802c1f807669557234f Mon Sep 17 00:00:00 2001 From: Juan Picado Date: Wed, 18 Jan 2023 22:50:29 +0100 Subject: [PATCH] chore: removed unused files --- eslint/index.js | 29 ------------------ eslint/rules/base.js | 64 ---------------------------------------- eslint/rules/jest.js | 20 ------------- eslint/rules/prettier.js | 4 --- package.json | 2 +- 5 files changed, 1 insertion(+), 118 deletions(-) delete mode 100644 eslint/index.js delete mode 100644 eslint/rules/base.js delete mode 100644 eslint/rules/jest.js delete mode 100644 eslint/rules/prettier.js diff --git a/eslint/index.js b/eslint/index.js deleted file mode 100644 index 3ab3fe396..000000000 --- a/eslint/index.js +++ /dev/null @@ -1,29 +0,0 @@ -module.exports = { - extends: ['./rules/base.js', './rules/prettier.js', './rules/jest.js'], - env: { - es6: true, - node: true, - }, - globals: { - __APP_VERSION__: true, - NodeJS: true, - cy: true, - }, - parserOptions: { - allowImportExportEverywhere: true, - sourceType: 'module', - ecmaVersion: 11, - ecmaFeatures: { - impliedStrict: true, - jsx: true, - }, - }, - settings: { - 'import/resolver': { - node: { - extensions: ['.js', '.jsx', '.ts', '.tsx'], - }, - }, - }, - parser: '@typescript-eslint/parser', -}; diff --git a/eslint/rules/base.js b/eslint/rules/base.js deleted file mode 100644 index 296d2bb3e..000000000 --- a/eslint/rules/base.js +++ /dev/null @@ -1,64 +0,0 @@ -module.exports = { - extends: [ - 'eslint:recommended', - 'google', - 'plugin:@typescript-eslint/eslint-recommended', - 'plugin:@typescript-eslint/recommended', - 'plugin:import/typescript', - ], - plugins: ['import'], - rules: { - curly: ['error', 'all'], - 'keyword-spacing': 'off', - 'no-tabs': 'off', - 'no-useless-escape': 'off', - 'padded-blocks': 'off', - 'require-jsdoc': 'off', - 'valid-jsdoc': 'off', - 'eol-last': 'error', - 'no-irregular-whitespace': 'error', - 'no-mixed-spaces-and-tabs': ['error', 'smart-tabs'], - 'no-trailing-spaces': 'error', - camelcase: 'off', - 'guard-for-in': 'error', - 'new-cap': 'error', - // disabled in favor of @typescript-eslint/no-unused-vars - 'no-unused-vars': 'off', - 'max-len': ['error', 100], - 'no-console': ['error', { allow: ['warn'] }], - 'no-constant-condition': 'error', - 'no-debugger': 'error', - 'no-empty': 'error', - 'no-fallthrough': 'error', - 'no-invalid-this': 'error', - 'no-new-require': 'error', - 'no-undef': 'error', - 'no-unreachable': 'error', - 'no-var': 'error', - 'one-var': 'error', - 'prefer-rest-params': 'error', - 'prefer-spread': 'error', - 'handle-callback-err': 0, - 'prefer-const': 0, - // typescript - '@typescript-eslint/camelcase': 0, - '@typescript-eslint/ban-ts-ignore': 0, - '@typescript-eslint/no-var-requires': 0, - '@typescript-eslint/no-inferrable-types': 0, - '@typescript-eslint/no-empty-function': 0, - '@typescript-eslint/no-this-alias': 0, - '@typescript-eslint/no-use-before-define': 0, - '@typescript-eslint/array-type': ['error'], - '@typescript-eslint/no-explicit-any': 0, - '@typescript-eslint/indent': 0, - '@typescript-eslint/ban-ts-comment': 0, - '@typescript-eslint/ban-types': 0, - '@typescript-eslint/explicit-module-boundary-types': 0, - // rules to fix - 'prefer-promise-reject-errors': ['warn'], - - '@typescript-eslint/prefer-optional-chain': ['warn'], - '@typescript-eslint/explicit-member-accessibility': 0, - '@typescript-eslint/no-unused-vars': ['error'], - }, -}; diff --git a/eslint/rules/jest.js b/eslint/rules/jest.js deleted file mode 100644 index 29f637d33..000000000 --- a/eslint/rules/jest.js +++ /dev/null @@ -1,20 +0,0 @@ -module.exports = { - extends: ['plugin:jest/recommended'], - plugins: ['jest'], - env: { - jest: true, - }, - rules: { - 'jest/no-export': 0, - 'jest/no-test-callback': 0, - 'jest/expect-expect': 0, - 'jest/no-try-expect': 0, - 'jest/no-done-callback': 'off', - 'jest/no-conditional-expect': 'off', - 'jest/valid-title': 'off', - // rules to fix - 'jest/no-identical-title': ['warn'], - 'jest/no-disabled-tests': ['warn'], - 'jest/no-commented-out-tests': ['warn'], - }, -}; diff --git a/eslint/rules/prettier.js b/eslint/rules/prettier.js deleted file mode 100644 index 1c5d7a44e..000000000 --- a/eslint/rules/prettier.js +++ /dev/null @@ -1,4 +0,0 @@ -module.exports = { - extends: ['plugin:prettier/recommended'], - plugins: ['prettier'], -}; diff --git a/package.json b/package.json index 1dce60844..f068605b3 100644 --- a/package.json +++ b/package.json @@ -167,7 +167,7 @@ "test:all": "yarn run test && yarn run test:functional", "pre:ci": "yarn run lint", "lint:ts": "yarn run type-check", - "lint": "eslint -c ./eslint/index.js \"**/*.{js,jsx,ts}\" --max-warnings 145 -c ./eslintrc.js", + "lint": "eslint \"**/*.{js,jsx,ts}\" --max-warnings 145 -c ./eslintrc.js", "lint:lockfile": "lockfile-lint --path yarn.lock --type yarn --validate-https --allowed-hosts verdaccio npm yarn", "start": "yarn babel-node --extensions \".ts,.tsx\" src/lib/cli --inspect", "start:brk": "yarn babel-node --extensions \".ts,.tsx\" src/lib/cli --inspect-brk",