diff --git a/.eslintrc.js b/.eslintrc.js index 9431e06..e19d94f 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -15,9 +15,20 @@ module.exports = { '@typescript-eslint/ban-ts-ignore': 'off', //stackoverflow.com/questions/59729654/how-ignore-typescript-errors-with-ts-ignore '@typescript-eslint/camelcase': 'off', '@typescript-eslint/explicit-function-return-type': 'off', - '@typescript-eslint/interface-name-prefix': [ + '@typescript-eslint/naming-convention': [ // https://stackoverflow.com/questions/62915344/eslint-erro-when-adding-rule-typescript-eslint-interface-name-prefix + "error", + { + "selector": "interface", + "format": ["PascalCase"], + "custom": { + "regex": "^I[A-Z]", + "match": true + } + } + ], + '@typescript-eslint/ban-ts-comment': [ 'error', - { prefixWithI: 'always' }, + {'ts-ignore': false}, ], '@typescript-eslint/no-unused-vars': ['warn', { args: 'none' }], '@typescript-eslint/no-explicit-any': 'off', @@ -39,4 +50,3 @@ module.exports = { 'prefer-arrow-callback': 'error' } }; - diff --git a/package.json b/package.json index 3bfd60f..68fc6e6 100644 --- a/package.json +++ b/package.json @@ -69,15 +69,14 @@ "@types/mocha": "^5.2.5", "@types/node": "^10.11.6", "@types/webpack-env": "^1.13.6", - "@typescript-eslint/eslint-plugin": "^2.31.0", - "@typescript-eslint/parser": "^2.31.0", + "@typescript-eslint/eslint-plugin": "^5.10.0", + "@typescript-eslint/parser": "^5.10.0", "css-loader": "^3.2.0", - "eslint": "^6.8.0", + "eslint": "^8.0.0", "eslint-config-prettier": "^6.11.0", "eslint-plugin-prettier": "^3.1.3", "expect.js": "^0.3.1", "fs-extra": "^7.0.0", - "husky": "^4.2.5", "karma": "^6.0.0", "karma-chrome-launcher": "^2.2.0", "karma-firefox-launcher": "^1.1.0", @@ -108,16 +107,6 @@ } } }, - "husky": { - "hooks": { - "pre-commit": "lint-staged" - } - }, - "lint-staged": { - "*.ts": [ - "eslint . --ext .ts --fix" - ] - }, "prettier": { "singleQuote": true }