Skip to content

Commit

Permalink
feat: removed tslint
Browse files Browse the repository at this point in the history
  • Loading branch information
roman committed Jul 11, 2020
1 parent 4b33f91 commit af89b33
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 96 deletions.
42 changes: 27 additions & 15 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,41 +1,44 @@
module.exports = {
root: true,
env: {
es6: true,
node: true,
browser: true,
},
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'plugin:unicorn/recommended',
'plugin:promise/recommended',
'plugin:sonarjs/recommended',
'plugin:import/warnings',
'plugin:regexp/recommended',
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2019,
project: 'tsconfig.json',
sourceType: 'module',
ecmaFeatures: {
jsx: false,
},
project: 'tsconfig.json',
warnOnUnsupportedTypeScriptVersion: false,
},
plugins: [
'unicorn',
'import',
'wix-editor',
'@typescript-eslint/tslint',
'@typescript-eslint',
'prettier',
'simple-import-sort',
'promise',
'sonarjs',
'sort-class-members',
'etc',
'only-warn',
],
rules: {
// core
'no-unused-vars': 0,
'no-undef': 0,
'consistent-return': [1, { treatUndefinedAsUnspecified: true }],
quotes: [1, 'single', { allowTemplateLiterals: true, avoidEscape: true }],
semi: [1, 'always'],
Expand Down Expand Up @@ -65,26 +68,35 @@ module.exports = {
},
],
// import
'import/newline-after-import': 0,
'import/no-duplicates': 1,
'import/max-dependencies': [1, { max: 15 }],
// sort-imports
// simple-import-sort with recomended settings
'simple-import-sort/sort': 1,
'prettier/prettier': [1, { endOfLine: 'auto' }],
'sort-imports': 'off',
'import/order': 'off',
// tslint
'@typescript-eslint/no-use-before-define': 0,
// typescript-eslint
'@typescript-eslint/no-floating-promises': 1,
'@typescript-eslint/explicit-function-return-type': 0,
'@typescript-eslint/ban-ts-ignore': 0,
'@typescript-eslint/no-unnecessary-condition': 1,
'@typescript-eslint/tslint/config': [
// sort-class-members
'sort-class-members/sort-class-members': [
1,
{
lintFile: './tslint.json',
order: [
'[static-properties]',
'[static-methods]',
'[properties]',
'[conventional-private-properties]',
'constructor',
'[methods]',
'[conventional-private-methods]',
],
accessorPairPositioning: 'getThenSet',
},
],
// etc
'etc/no-unused-declaration': 1,
'etc/deprecation': 1,
'etc/no-assign-mutated-array': 1,
'etc/no-t': 1,
},
overrides: [
{
Expand Down
13 changes: 4 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,8 @@
"eslint:w": "watchexec -w src \"npm run eslint\"",
"eslint": "node node_modules/eslint/bin/eslint \"src/**/*.{ts,tsx}\"",
"eslint:fix": "npm run eslint -- --fix",
"tslint:fix": "node node_modules/tslint/bin/tslint -p tsconfig.json --fix",
"lint:w": "run-p tsclint:w eslint:w",
"lint:fix": "npm run tslint:fix || true && npm run eslint:fix",
"lint:fix": "eslint:fix",
"commit": "node node_modules/cz-customizable/standalone.js",
"cmlint": "sh Taskfile commit_lint",
"semantic-release": "semantic-release",
Expand Down Expand Up @@ -57,18 +56,20 @@
"@types/jest": "^26.0.4",
"@types/node": "^14.0.22",
"@typescript-eslint/eslint-plugin": "^3.6.0",
"@typescript-eslint/eslint-plugin-tslint": "^3.6.0",
"@typescript-eslint/parser": "^3.6.0",
"cz-customizable": "^6.2.1",
"eslint": "^7.4.0",
"eslint-import-resolver-node": "^0.3.4",
"eslint-plugin-etc": "0.0.1-beta.34",
"eslint-plugin-import": "^2.22.0",
"eslint-plugin-jest": "^23.18.0",
"eslint-plugin-only-warn": "^1.0.2",
"eslint-plugin-prettier": "^3.1.4",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-regexp": "^0.1.1",
"eslint-plugin-simple-import-sort": "^5.0.3",
"eslint-plugin-sonarjs": "^0.5.0",
"eslint-plugin-sort-class-members": "^1.7.0",
"eslint-plugin-unicorn": "^20.1.0",
"eslint-plugin-wix-editor": "^3.2.0",
"git-branch-is": "^3.1.0",
Expand All @@ -85,12 +86,6 @@
"semantic-release-monorepo": "^7.0.2",
"simplytyped": "^3.3.0",
"ts-jest": "^26.1.1",
"tslint": "^6.1.2",
"tslint-clean-code": "^0.2.10",
"tslint-consistent-codestyle": "^1.16.0",
"tslint-etc": "^1.11.1",
"tslint-microsoft-contrib": "^6.2.0",
"tslint-sonarts": "^1.9.0",
"type-coverage": "^2.8.4",
"typescript": "~3.9.6",
"watchexec-bin": "^1.0.0"
Expand Down
72 changes: 0 additions & 72 deletions tslint.json

This file was deleted.

0 comments on commit af89b33

Please sign in to comment.