Skip to content

Commit

Permalink
feat: enable plugin:sonar/recommended, refactor tsconfig/tslint files
Browse files Browse the repository at this point in the history
  • Loading branch information
JounQin committed Mar 14, 2021
1 parent 1ed4f9f commit 70c8a99
Show file tree
Hide file tree
Showing 28 changed files with 1,676 additions and 2,134 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
*.log
*.tsbuildinfo
.*cache
.type-coverage
coverage
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
- [@1stg/lib-config](./packages/lib-config/CHANGELOG.md)
- [@1stg/lint-staged](./packages/lint-staged/CHANGELOG.md)
- [@1stg/postcss-config](./packages/postcss-config/CHANGELOG.md)
- [@1stg/prettier-config](./packages/prettier-config/CHANGELOG.md)
- [@1stg/remark-config](./packages/remark-config/CHANGELOG.md)
- [@1stg/renovate-config](./packages/renovate-config/CHANGELOG.md)
- [@1stg/stylelint-config](./packages/stylelint-config/CHANGELOG.md)
Expand Down
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,31 +20,31 @@
"lint:scss": "stylelint --cache 'tests/*.{scss,vue}'",
"lint:ts": "tslint -p . -t stylish",
"lint:tsc": "tsc",
"postinstall": "yarn-deduplicate || exit 0",
"postinstall": "yarn-deduplicate --strategy fewer || exit 0",
"test": "jest ---collectCoverage",
"typecov": "type-coverage"
},
"devDependencies": {
"@angular/core": "^11.2.3",
"@angular/core": "^11.2.5",
"@types/jest": "^26.0.20",
"@types/node": "^14.14.31",
"@types/react": "^17.0.2",
"@types/node": "^14.14.34",
"@types/react": "^17.0.3",
"@types/unist": "^2.0.3",
"core-js": "^3.9.1",
"lerna": "^3.22.1",
"lerna": "^4.0.0",
"npm-run-all": "^4.1.5",
"react": "^17.0.1",
"rxjs": "^6.6.6",
"svelte": "^3.35.0",
"ts-jest": "^26.5.2",
"ts-jest": "^26.5.3",
"tslint": "^6.1.3",
"type-coverage": "^2.16.3",
"typescript": "^4.1.5",
"vue": "^2.6.12",
"yarn-deduplicate": "^3.1.0"
},
"resolutions": {
"@babel/core": "^7.13.8",
"@babel/core": "^7.13.10",
"prettier": "^2.2.1"
},
"typeCoverage": {
Expand Down
12 changes: 6 additions & 6 deletions packages/app-config/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@1stg/app-config",
"version": "1.2.9",
"version": "1.2.10",
"description": "Personal but Shareable App Configuration for all 1stG.me projects.",
"repository": "git+https://github.com/1stG/configs.git",
"homepage": "https://github.com/1stG/configs/tree/master/packages/app-config",
Expand All @@ -11,14 +11,14 @@
},
"dependencies": {
"@1stg/browserslist-config": "^1.0.0",
"@1stg/common-config": "^1.2.10",
"@1stg/postcss-config": "^1.1.0",
"@1stg/stylelint-config": "^1.2.1",
"@1stg/common-config": "^1.2.11",
"@1stg/postcss-config": "^1.1.1",
"@1stg/stylelint-config": "^1.2.2",
"@pkgr/es-modules": "^0.4.0",
"@pkgr/imagemin": "^0.5.0",
"browserslist": "^4.16.3",
"postcss": "^8.2.6",
"stylelint": "^13.11.0"
"postcss": "^8.2.8",
"stylelint": "^13.12.0"
},
"publishConfig": {
"access": "public"
Expand Down
4 changes: 2 additions & 2 deletions packages/babel-preset/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@1stg/babel-preset",
"version": "1.4.0",
"version": "1.4.1",
"description": "Personal but Shareable Babel Preset for all 1stG.me projects.",
"repository": "[email protected]:1stG/configs.git",
"author": "JounQin <[email protected]>",
Expand All @@ -15,7 +15,7 @@
"@babel/helper-plugin-utils": "^7.13.0",
"@babel/plugin-proposal-class-properties": "^7.13.0",
"@babel/plugin-proposal-decorators": "^7.13.5",
"@babel/preset-env": "^7.13.9",
"@babel/preset-env": "^7.13.10",
"@babel/preset-react": "^7.12.13",
"@babel/preset-typescript": "^7.13.0",
"@pkgr/utils": "^0.6.0",
Expand Down
18 changes: 9 additions & 9 deletions packages/common-config/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@1stg/common-config",
"version": "1.2.10",
"version": "1.2.11",
"description": "Personal but Shareable Common Configuration for all 1stG.me projects.",
"repository": "git+https://github.com/1stG/configs.git",
"homepage": "https://github.com/1stG/configs/tree/master/packages/common-config",
Expand All @@ -10,16 +10,16 @@
"node": ">=10.0.0"
},
"dependencies": {
"@1stg/babel-preset": "^1.4.0",
"@1stg/babel-preset": "^1.4.1",
"@1stg/commitlint-config": "^1.0.3",
"@1stg/eslint-config": "^1.8.0",
"@1stg/eslint-config": "^1.8.1",
"@1stg/husky-config": "^1.0.2",
"@1stg/lint-staged": "^1.1.2",
"@1stg/prettier-config": "^1.4.0",
"@1stg/remark-config": "^1.0.0",
"@1stg/tsconfig": "^1.1.0",
"@babel/core": "^7.13.8",
"eslint": "^7.21.0",
"@1stg/lint-staged": "^1.1.3",
"@1stg/prettier-config": "^1.4.1",
"@1stg/remark-config": "^1.0.1",
"@1stg/tsconfig": "^1.1.1",
"@babel/core": "^7.13.10",
"eslint": "^7.22.0",
"husky": "^4.3.8",
"lint-staged": "^10.5.4",
"prettier": "^2.2.1",
Expand Down
3 changes: 1 addition & 2 deletions packages/eslint-config/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ module.exports = {
'plugin:node/recommended',
'plugin:promise/recommended',
'plugin:sonarjs/recommended',
'plugin:sonar/recommended',
'plugin:unicorn/recommended',
'standard',
'plugin:prettier/recommended',
],
plugins: ['sonar'],
settings: {
node: {
allowModules,
Expand Down Expand Up @@ -90,7 +90,6 @@ module.exports = {
'node/no-unpublished-require': 0,
'prefer-const': 2,
'prefer-object-spread': 2,
'sonar/deprecation': 1,
'unicorn/catch-error-name': [
2,
{
Expand Down
3 changes: 3 additions & 0 deletions packages/eslint-config/overrides.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,11 @@ const tsBase = {
{
allowAliases: 'in-unions-and-intersections',
allowCallbacks: 'always',
allowConditionalTypes: 'always',
allowConstructors: 'always',
allowLiterals: 'in-unions-and-intersections',
allowMappedTypes: 'always',
allowTupleTypes: 'always',
},
],
'@typescript-eslint/no-use-before-define': [
Expand Down
20 changes: 10 additions & 10 deletions packages/eslint-config/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@1stg/eslint-config",
"version": "1.8.0",
"version": "1.8.1",
"description": "Personal but Shareable ESLint Configuration for all 1stG.me projects.",
"repository": "[email protected]:1stG/configs.git",
"homepage": "https://github.com/1stG/configs/tree/master/packages/eslint-config",
Expand All @@ -10,12 +10,12 @@
"eslint": ">=6.0.0"
},
"dependencies": {
"@babel/eslint-parser": "^7.13.8",
"@babel/eslint-plugin": "^7.13.0",
"@babel/eslint-parser": "^7.13.10",
"@babel/eslint-plugin": "^7.13.10",
"@pkgr/utils": "^0.6.0",
"@typescript-eslint/eslint-plugin": "^4.16.1",
"@typescript-eslint/eslint-plugin-tslint": "^4.16.1",
"@typescript-eslint/parser": "^4.16.1",
"@typescript-eslint/eslint-plugin": "^4.17.0",
"@typescript-eslint/eslint-plugin-tslint": "^4.17.0",
"@typescript-eslint/parser": "^4.17.0",
"eslint-config-prettier": "^8.1.0",
"eslint-config-standard": "^16.0.2",
"eslint-config-standard-jsx": "^10.0.0",
Expand All @@ -24,18 +24,18 @@
"eslint-import-resolver-typescript": "^2.4.0",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-jest": "^24.1.5",
"eslint-plugin-mdx": "^1.9.0",
"eslint-plugin-jest": "^24.3.1",
"eslint-plugin-mdx": "^1.9.1",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^3.3.1",
"eslint-plugin-promise": "^4.3.1",
"eslint-plugin-react": "^7.22.0",
"eslint-plugin-react-hooks": "^4.2.0",
"eslint-plugin-sonar": "^0.2.0",
"eslint-plugin-sonar": "^0.4.0",
"eslint-plugin-sonarjs": "^0.6.0",
"eslint-plugin-svelte": "^1.1.2",
"eslint-plugin-unicorn": "^28.0.2",
"eslint-plugin-vue": "^7.6.0"
"eslint-plugin-vue": "^7.7.0"
},
"publishConfig": {
"access": "public"
Expand Down
4 changes: 2 additions & 2 deletions packages/lib-config/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@1stg/lib-config",
"version": "1.1.9",
"version": "1.1.10",
"description": "Personal but Shareable Library Configuration for all 1stG.me projects.",
"repository": "git+https://github.com/1stG/configs.git",
"homepage": "https://github.com/1stG/configs/tree/master/packages/lib-config",
Expand All @@ -10,7 +10,7 @@
"node": ">=10.0.0"
},
"dependencies": {
"@1stg/common-config": "^1.2.10",
"@1stg/common-config": "^1.2.11",
"@pkgr/rollup": "^0.11.3",
"jest": "^26.6.3"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/lint-staged/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@1stg/lint-staged",
"version": "1.1.2",
"version": "1.1.3",
"description": "Personal but Shareable lint-staged Configuration for all 1stG.me projects.",
"repository": "[email protected]:1stG/configs.git",
"author": "JounQin <[email protected]>",
Expand All @@ -9,7 +9,7 @@
"lint-staged": ">=10.0.0"
},
"dependencies": {
"@1stg/prettier-config": "^1.4.0",
"@1stg/prettier-config": "^1.4.1",
"@pkgr/utils": "^0.6.0",
"cross-env": "^7.0.3",
"prettier": "^2.2.1"
Expand Down
4 changes: 2 additions & 2 deletions packages/postcss-config/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@1stg/postcss-config",
"version": "1.1.0",
"version": "1.1.1",
"description": "Personal but Shareable PostCSS Configuration for all 1stG.me projects.",
"repository": "[email protected]:1stG/configs.git",
"author": "JounQin <[email protected]>",
Expand All @@ -12,7 +12,7 @@
"postcss": ">=7.0.0"
},
"dependencies": {
"autoprefixer": "^10.2.4",
"autoprefixer": "^10.2.5",
"cssnano": "^4.1.10",
"cssnano-preset-advanced": "^4.0.7",
"postcss-import": "^14.0.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/prettier-config/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@1stg/prettier-config",
"version": "1.4.0",
"version": "1.4.1",
"description": "Personal but Shareable Prettier Configuration for all 1stG.me projects.",
"repository": "[email protected]:1stG/configs.git",
"author": "JounQin <[email protected]>",
Expand All @@ -11,10 +11,10 @@
"dependencies": {
"@prettier/plugin-pug": "^1.13.5",
"@prettier/plugin-ruby": "^1.5.3",
"@prettier/plugin-xml": "^0.13.0",
"@prettier/plugin-xml": "^0.13.1",
"prettier-plugin-pkg": "^0.8.0",
"prettier-plugin-sh": "^0.6.0",
"prettier-plugin-svelte": "^2.1.6",
"prettier-plugin-svelte": "^2.2.0",
"prettier-plugin-toml": "^0.3.1"
},
"publishConfig": {
Expand Down
4 changes: 2 additions & 2 deletions packages/remark-config/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@1stg/remark-config",
"version": "1.0.0",
"version": "1.0.1",
"description": "Personal but Shareable Remark Configuration for all 1stG.me projects.",
"repository": "[email protected]:1stG/configs.git",
"author": "JounQin <[email protected]>",
Expand All @@ -10,7 +10,7 @@
"remark-preset-lint-consistent": "^4.0.0",
"remark-preset-lint-markdown-style-guide": "^4.0.0",
"remark-preset-lint-recommended": "^5.0.0",
"remark-preset-prettier": "^0.4.0"
"remark-preset-prettier": "^0.4.1"
},
"publishConfig": {
"access": "public"
Expand Down
4 changes: 2 additions & 2 deletions packages/stylelint-config/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@1stg/stylelint-config",
"version": "1.2.1",
"version": "1.2.2",
"description": "Personal but Shareable Stylelint Configuration for all 1stG.me projects.",
"repository": "[email protected]:1stG/configs.git",
"author": "JounQin <[email protected]>",
Expand All @@ -11,7 +11,7 @@
"dependencies": {
"@pkgr/utils": "^0.6.0",
"stylelint-config-prettier": "^8.0.2",
"stylelint-config-standard": "^20.0.0",
"stylelint-config-standard": "^21.0.0",
"stylelint-high-performance-animation": "^1.5.2",
"stylelint-no-unsupported-browser-features": "^4.1.4",
"stylelint-prettier": "^1.2.0",
Expand Down
16 changes: 6 additions & 10 deletions packages/tsconfig/angular.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
{
"$schema": "http://json.schemastore.org/tsconfig",
"extends": "./app.json",
"extends": "./ng-lib.json",
"compilerOptions": {
"emitDecoratorMetadata": true,
"target": "es2015"
},
"angularCompilerOptions": {
"fullTemplateTypeCheck": true,
"strictInjectionParameters": true,
"strictMetadataEmit": true,
"strictTemplates": true,
"trace": true
"declaration": false,
"paths": {
"*": ["src/*"]
},
"outDir": "dist"
}
}
3 changes: 1 addition & 2 deletions packages/tsconfig/app.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
{
"$schema": "http://json.schemastore.org/tsconfig",
"extends": "./loose.json",
"extends": "./dom-lib.json",
"compilerOptions": {
"declaration": false,
"declarationMap": false,
"paths": {
"*": [
"src/*"
Expand Down
11 changes: 11 additions & 0 deletions packages/tsconfig/dom-lib.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "http://json.schemastore.org/tsconfig",
"extends": "./loose.json",
"compilerOptions": {
"lib": [
"DOM",
"ESNext"
],
"outDir": "lib"
}
}
1 change: 0 additions & 1 deletion packages/tsconfig/lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"extends": "./tsconfig.json",
"compilerOptions": {
"declaration": true,
"declarationMap": true,
"outDir": "lib"
}
}
14 changes: 14 additions & 0 deletions packages/tsconfig/ng-lib.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"$schema": "http://json.schemastore.org/tsconfig",
"extends": "./dom-lib.json",
"compilerOptions": {
"emitDecoratorMetadata": true
},
"angularCompilerOptions": {
"fullTemplateTypeCheck": true,
"strictInjectionParameters": true,
"strictMetadataEmit": true,
"strictTemplates": true,
"trace": true
}
}
2 changes: 1 addition & 1 deletion packages/tsconfig/node.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"$schema": "http://json.schemastore.org/tsconfig",
"extends": "./lib.json",
"compilerOptions": {
"module": "commonjs"
"module": "CommonJS"
}
}
Loading

0 comments on commit 70c8a99

Please sign in to comment.