Skip to content

Commit

Permalink
fix(eslint-config): disable some too strict rules in loose mode
Browse files Browse the repository at this point in the history
  • Loading branch information
JounQin committed Jun 2, 2020
1 parent 9842395 commit 078eda1
Show file tree
Hide file tree
Showing 11 changed files with 864 additions and 785 deletions.
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,22 +27,22 @@
"devDependencies": {
"@angular/core": "^9.1.9",
"@types/jest": "^25.2.3",
"@types/node": "^14.0.5",
"@types/node": "^14.0.9",
"@types/react": "^16.9.35",
"@types/unist": "^2.0.3",
"core-js": "^3.6.5",
"lerna": "^3.21.0",
"lerna": "^3.22.0",
"npm-run-all": "^4.1.5",
"react": "^16.13.1",
"ts-jest": "26.0.0",
"ts-jest": "26.1.0",
"tslint": "^6.1.2",
"type-coverage": "^2.6.1",
"type-coverage": "^2.7.0",
"typescript": "^3.9.3",
"vue": "^2.6.11",
"yarn-deduplicate": "^2.0.0"
},
"resolutions": {
"@babel/core": "^7.9.6",
"@babel/core": "^7.10.2",
"prettier": "^2.0.5"
},
"typeCoverage": {
Expand Down
6 changes: 3 additions & 3 deletions packages/app-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@
"@1stg/remark-config": "^0.5.3",
"@1stg/stylelint-config": "^0.12.2",
"@1stg/tsconfig": "^0.10.3",
"@babel/core": "^7.9.6",
"@babel/core": "^7.10.2",
"@pkgr/es-modules": "^0.3.2",
"@pkgr/imagemin": "^0.4.4",
"browserslist": "^4.12.0",
"eslint": "^7.1.0",
"husky": "^4.2.5",
"lint-staged": "^10.2.6",
"postcss": "^7.0.30",
"lint-staged": "^10.2.7",
"postcss": "^7.0.31",
"prettier": "^2.0.5",
"stylelint": "^13.5.0",
"tslib": "^2.0.0"
Expand Down
12 changes: 6 additions & 6 deletions packages/babel-preset/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
"@babel/core": ">=7.9.0"
},
"dependencies": {
"@babel/helper-plugin-utils": "^7.8.3",
"@babel/plugin-proposal-class-properties": "^7.8.3",
"@babel/plugin-proposal-decorators": "^7.8.3",
"@babel/preset-env": "^7.9.6",
"@babel/preset-react": "^7.9.4",
"@babel/preset-typescript": "^7.9.0",
"@babel/helper-plugin-utils": "^7.10.1",
"@babel/plugin-proposal-class-properties": "^7.10.1",
"@babel/plugin-proposal-decorators": "^7.10.1",
"@babel/preset-env": "^7.10.2",
"@babel/preset-react": "^7.10.1",
"@babel/preset-typescript": "^7.10.1",
"@pkgr/utils": "^0.4.4",
"@vue/babel-helper-vue-jsx-merge-props": "^1.0.0",
"@vue/babel-preset-jsx": "^1.1.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-config/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ module.exports = {
2,
{
name: 'error',
caughtErrorsIgnorePattern: '^e(rr)?$',
ignore: ['^e(rr)?$'],
},
],
'unicorn/consistent-function-scoping': 0,
Expand Down
4 changes: 4 additions & 0 deletions packages/eslint-config/loose.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@ module.exports = {
extends: ['@1stg'],
rules: {
'@typescript-eslint/member-ordering': 0,
'@typescript-eslint/naming-convention': 0,
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/no-floating-promises': 0,
'@typescript-eslint/no-magic-numbers': 0,
'@typescript-eslint/no-type-alias': 0,
'@typescript-eslint/no-unnecessary-condition': 0,
'@typescript-eslint/no-unsafe-assignment': 0,
'@typescript-eslint/no-unsafe-member-access': 0,
'@typescript-eslint/no-unsafe-return': 0,
'@typescript-eslint/restrict-plus-operands': 0,
'@typescript-eslint/unbound-method': 0,
'no-magic-numbers': 0,
Expand Down
13 changes: 12 additions & 1 deletion packages/eslint-config/overrides.js
Original file line number Diff line number Diff line change
Expand Up @@ -301,9 +301,20 @@ exports.tslint = {

exports.angular = [
{
files: ['*.component.ts', '*.module.ts', 'component.ts', 'module.ts'],
files: [
'*.directive.ts',
'*.component.ts',
'*.interceptor.ts',
'*.guard.ts',
'*.module.ts',
'*.pipe.ts',
'*.service.ts',
'component.ts',
'module.ts',
],
rules: {
'@typescript-eslint/no-extraneous-class': 0,
'no-use-before-define': 0,
},
},
]
Expand Down
14 changes: 7 additions & 7 deletions packages/eslint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
},
"dependencies": {
"@pkgr/utils": "^0.4.4",
"@typescript-eslint/eslint-plugin": "^3.0.0",
"@typescript-eslint/eslint-plugin-tslint": "^3.0.0",
"@typescript-eslint/parser": "^3.0.0",
"@typescript-eslint/eslint-plugin": "^3.1.0",
"@typescript-eslint/eslint-plugin-tslint": "^3.1.0",
"@typescript-eslint/parser": "^3.1.0",
"babel-eslint": "^10.1.0",
"eslint-config-prettier": "^6.11.0",
"eslint-config-standard": "^14.1.1",
Expand All @@ -23,16 +23,16 @@
"eslint-import-resolver-ts": "^0.4.2",
"eslint-plugin-babel": "^5.3.0",
"eslint-plugin-import": "^2.20.2",
"eslint-plugin-jest": "^23.13.1",
"eslint-plugin-mdx": "^1.6.9",
"eslint-plugin-jest": "^23.13.2",
"eslint-plugin-mdx": "^1.7.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^3.1.3",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-react": "^7.20.0",
"eslint-plugin-react-hooks": "^4.0.2",
"eslint-plugin-react-hooks": "^4.0.4",
"eslint-plugin-sonarjs": "^0.5.0",
"eslint-plugin-standard": "^4.0.1",
"eslint-plugin-unicorn": "^20.0.0",
"eslint-plugin-unicorn": "^20.1.0",
"eslint-plugin-vue": "^6.2.2"
},
"publishConfig": {
Expand Down
4 changes: 2 additions & 2 deletions packages/lib-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
"@1stg/prettier-config": "^0.10.2",
"@1stg/remark-config": "^0.5.3",
"@1stg/tsconfig": "^0.10.3",
"@babel/core": "^7.9.6",
"@babel/core": "^7.10.2",
"@pkgr/rollup": "^0.10.4",
"eslint": "^7.1.0",
"husky": "^4.2.5",
"jest": "^26.0.1",
"lint-staged": "^10.2.6",
"lint-staged": "^10.2.7",
"prettier": "^2.0.5",
"tslib": "^2.0.0"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/lint-staged/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"dependencies": {
"@pkgr/utils": "^0.4.4",
"@prettier/plugin-pug": "^1.3.0",
"@prettier/plugin-pug": "^1.4.3",
"@prettier/plugin-ruby": "^0.18.2",
"cross-env": "^7.0.2",
"prettier": "^2.0.4",
Expand Down
2 changes: 1 addition & 1 deletion packages/prettier-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"prettier": ">=1.18.0"
},
"dependencies": {
"@prettier/plugin-pug": "^1.3.0",
"@prettier/plugin-pug": "^1.4.3",
"@prettier/plugin-ruby": "^0.18.2",
"prettier-plugin-pkg": "^0.7.0",
"prettier-plugin-sh": "^0.4.0",
Expand Down
Loading

0 comments on commit 078eda1

Please sign in to comment.