Skip to content

Commit

Permalink
Drop ts-sort-keys for member-ordering and bump deps (#116)
Browse files Browse the repository at this point in the history
  • Loading branch information
merrywhether authored Aug 18, 2023
1 parent 8d8709f commit c4ef771
Show file tree
Hide file tree
Showing 4 changed files with 708 additions and 243 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ When the `typescript` option is selected, the following are added:

- [`@typescript-eslint`](https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin#supported-rules)
(recommended++, including type-aware)
- [`typescript-sort-keys`](https://github.com/infctr/eslint-plugin-typescript-sort-keys#usage)
(recommended)

When the `react` option is selected, the following are added:

Expand Down
21 changes: 10 additions & 11 deletions eslint/typescript.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,30 @@ const baseRules = {
'@typescript-eslint/default-param-last': 'error',
'@typescript-eslint/explicit-function-return-type': 'error',
'@typescript-eslint/explicit-module-boundary-types': 'error',
'@typescript-eslint/member-ordering': [
'error',
{
default: { optionalityOrder: 'required-first', order: 'alphabetically' },
},
],
'@typescript-eslint/no-import-type-side-effects': 'error',
'@typescript-eslint/no-shadow': 'error',
'@typescript-eslint/no-unused-expressions': [
'error',
{ enforceForJSX: true },
],
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/no-use-before-define': 'off',
'@typescript-eslint/prefer-optional-chain': 'error',
'@typescript-eslint/sort-type-union-intersection-members': 'error',
'@typescript-eslint/sort-type-constituents': 'error',
'no-unused-expressions': 'off',
'no-unused-vars': 'off',
};

const typeRules = {
'@typescript-eslint/consistent-type-exports': [
'error',
{ fixMixedExportsWithInlineTypeSpecifier: true },
],
'@typescript-eslint/no-for-in-array': 'error',
'@typescript-eslint/no-throw-literal': 'error',
'@typescript-eslint/no-unnecessary-boolean-literal-compare': 'error',
'@typescript-eslint/no-unnecessary-condition': 'error',
'@typescript-eslint/prefer-nullish-coalescing': 'error',
'@typescript-eslint/prefer-reduce-type-parameter': 'error',
'@typescript-eslint/switch-exhaustiveness-check': 'error',
};
Expand All @@ -38,15 +38,14 @@ module.exports = {
overrides: [
{
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'plugin:typescript-sort-keys/recommended',
'plugin:@typescript-eslint/recommended-type-checked',
'plugin:@typescript-eslint/stylistic-type-checked',
],
// only enable TS rules for TS files
files: ['*.ts', '*.tsx'],
parser: '@typescript-eslint/parser',
parserOptions: {
project: './tsconfig.json',
project: true,
},
rules: {
...baseRules,
Expand Down
15 changes: 7 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,18 @@
},
"dependencies": {
"@styled/typescript-styled-plugin": "^1.0.0",
"@typescript-eslint/eslint-plugin": "^5.60.1",
"@typescript-eslint/parser": "^5.60.1",
"@typescript-eslint/eslint-plugin": "^6.4.0",
"@typescript-eslint/parser": "^6.4.0",
"command-line-args": "^5.2.1",
"eslint": "^8.46.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-react": "^7.32.2",
"eslint": "^8.47.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-import": "^2.28.0",
"eslint-plugin-prettier": "^5.0.0",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-solid": "^0.12.1",
"eslint-plugin-sort-destructure-keys": "^1.5.0",
"eslint-plugin-sort-keys-fix": "^1.1.2",
"eslint-plugin-typescript-sort-keys": "^2.3.0",
"prettier": "^3.0.2",
"typescript": "^5.1.6"
},
Expand Down
Loading

0 comments on commit c4ef771

Please sign in to comment.