Skip to content

Commit

Permalink
chore: upgrade to TSLint 6.0 (#4083)
Browse files Browse the repository at this point in the history
  • Loading branch information
adidahiya authored Apr 22, 2020
1 parent 4873110 commit 29ba3f0
Show file tree
Hide file tree
Showing 6 changed files with 73 additions and 187 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"stylelint-config-palantir": "^4.0.0",
"stylelint-scss": "^3.9.2",
"typescript": "~3.7.5",
"yarn-deduplicate": "^1.1.1"
"yarn-deduplicate": "^2.0.0"
},
"resolutions": {
"js-yaml": "3.13.1"
Expand Down
2 changes: 1 addition & 1 deletion packages/node-build-scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"stylelint": "~9.6.0",
"stylelint-junit-formatter": "^0.2.1",
"svgo": "^1.3.0",
"tslint": "^5.20.1",
"tslint": "~6.0.0",
"typescript": "~3.7.5"
},
"repository": {
Expand Down
24 changes: 13 additions & 11 deletions packages/tslint-config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,14 @@
*/

module.exports = {
extends: [
"tslint:latest",
"tslint-react",
// disable tslint rules which would conflict with eslint-plugin-prettier
"tslint-config-prettier",
],
extends: ["tslint:latest", "tslint-react"],

defaultSeverity: "error",

rules: {
"array-type": {
options: ["array-simple"],
},
ban: {
options: [
["_", "extend", "use object spread: { ...a, ...b }"],
Expand All @@ -39,6 +37,7 @@ module.exports = {
"linebreak-style": {
options: ["LF"],
},
"member-access": true,
"no-console": {
options: ["log", "time", "timeEnd", "trace"],
},
Expand All @@ -62,14 +61,17 @@ module.exports = {
},
"no-unnecessary-callback-wrapper": true,
"no-unnecessary-initializer": true,
"object-literal-sort-keys": true,
"ordered-imports": {
options: {
"import-sources-order": "case-insensitive",
"module-source-path": "full",
"named-imports-order": "case-insensitive",
},
},
"prefer-conditional-expression": false,
"variable-name": {
options: ["allow-leading-underscore", "allow-pascal-case", "ban-keywords", "check-format"],
},
},
jsRules: {
"no-console": false,
"object-literal-sort-keys": false,
"trailing-comma": false,
},
};
5 changes: 2 additions & 3 deletions packages/tslint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@
},
"dependencies": {
"tslib": "~1.10.0",
"tslint-config-prettier": "^1.18.0",
"tslint-react": "^4.0.0"
"tslint-react": "^5.0.0"
},
"peerDependencies": {
"tslint": "^5.12.1"
"tslint": "~6.0.0"
},
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion scripts/verifyCleanLockfile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ set -o pipefail

scripts_dir="$( dirname "$(readlink -f "$0")" )"
bin="$scripts_dir/../node_modules/.bin"
duplicates="$("$bin/yarn-deduplicate" "$scripts_dir/../yarn.lock" --list)"
duplicates="$("$bin/yarn-deduplicate" "$scripts_dir/../yarn.lock" --strategy fewer --list)"

if [[ $duplicates ]]; then
echo "Found duplicate blocks in yarn.lock which can be cleaned up. Please run 'yarn-deduplicate yarn.lock --strategy fewer'"
Expand Down
Loading

1 comment on commit 29ba3f0

@blueprint-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

chore: upgrade to TSLint 6.0 (#4083)

Previews: documentation | landing | table

Please sign in to comment.