Skip to content

Commit

Permalink
chore(linting): drop TSLint (#3009)
Browse files Browse the repository at this point in the history
* replaces prefer-conditional-expression rule with unicorn/prefer-ternary
* removes remaining tslint-stencil rules used to warn about component/lifecycle order

#791
  • Loading branch information
jcfranco authored Sep 10, 2021
1 parent 7af3bf0 commit 6e040c9
Show file tree
Hide file tree
Showing 9 changed files with 326 additions and 114 deletions.
5 changes: 3 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"ecmaVersion": 2018,
"sourceType": "module"
},
"plugins": ["@esri/calcite-components", "@typescript-eslint", "eslint-plugin-react", "jest", "prettier"],
"plugins": ["@esri/calcite-components", "@typescript-eslint", "eslint-plugin-react", "jest", "prettier", "unicorn"],
"rules": {
"@stencil/decorators-style": "warn",
"@stencil/own-methods-must-be-private": "off",
Expand Down Expand Up @@ -52,7 +52,8 @@
"react/jsx-sort-props": "error",
"react/jsx-uses-react": "error",
"react/jsx-uses-vars": "error",
"react/self-closing-comp": "error"
"react/self-closing-comp": "error",
"unicorn/prefer-ternary": "error"
},
"settings": {
"react": {
Expand Down
2 changes: 1 addition & 1 deletion .lintstagedrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"*.js": ["eslint --ext .js --fix", "prettier --write"],
"*.{json,md}": ["prettier --write"],
"*.scss": ["stylelint --fix", "prettier --write"],
"*.{ts,tsx}": ["tslint --project tsconfig-tslint.json --fix", "eslint --ext .ts,.tsx --fix", "prettier --write"]
"*.{ts,tsx}": ["eslint --ext .ts,.tsx --fix", "prettier --write"]
}
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ If something isn't working the way you expected, please take a look at [previous

### Getting a development environment set up

It is recommended to install the following extensions to your editor of choice: TypeScript, Sass, TailwindCSS, ESLint, TSLint and Prettier.
It is recommended to install the following extensions to your editor of choice: TypeScript, Sass, TailwindCSS, ESLint and Prettier.

#### Linting

Expand Down
Loading

0 comments on commit 6e040c9

Please sign in to comment.