Skip to content

Commit

Permalink
Migrate rules
Browse files Browse the repository at this point in the history
  • Loading branch information
silver886 committed Sep 28, 2023
1 parent 4af5421 commit 6ead149
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 14 deletions.
4 changes: 4 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ module.exports = {
es2021: true,
node: true,
},
extends: [
'eslint:recommended',
'plugin:import/recommended',
],
parserOptions: {
sourceType: 'module',
},
Expand Down
23 changes: 9 additions & 14 deletions typescript.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
/* eslint-disable import/no-commonjs, import/unambiguous */
module.exports = {
extends: [
'plugin:@typescript-eslint/recommended-type-checked',
'plugin:@typescript-eslint/strict-type-checked',
'plugin:@typescript-eslint/stylistic-type-checked',
'plugin:import/typescript',
'./index',
],
parserOptions: {
Expand Down Expand Up @@ -111,12 +115,7 @@ module.exports = {
'@typescript-eslint/keyword-spacing': ['error'],
'@typescript-eslint/lines-between-class-members': ['error'],
'@typescript-eslint/no-dupe-class-members': ['error'],
'@typescript-eslint/no-duplicate-imports': ['error',
{
includeExports: true,
},
],
'@typescript-eslint/no-empty-function': ['error',
'@typescript-eslint/no-empty-function': ['error',
{
allow: [
'protected-constructors',
Expand Down Expand Up @@ -264,9 +263,8 @@ module.exports = {
allowDefinitionFiles: true,
},
],
'@typescript-eslint/no-parameter-properties': ['error'],
'@typescript-eslint/no-require-imports': ['error'],
'@typescript-eslint/no-type-alias': ['error',
'@typescript-eslint/no-require-imports': ['error'],
'@typescript-eslint/no-type-alias': ['error',
{
allowAliases: 'in-unions-and-intersections',
allowCallbacks: 'always',
Expand All @@ -283,6 +281,7 @@ module.exports = {
'@typescript-eslint/no-unnecessary-type-arguments': ['error'],
'@typescript-eslint/no-unnecessary-type-constraint': ['error'],
'@typescript-eslint/non-nullable-type-assertion-style': ['error'],
'@typescript-eslint/parameter-properties': ['error'],
'@typescript-eslint/prefer-enum-initializers': ['error'],
'@typescript-eslint/prefer-for-of': ['error'],
'@typescript-eslint/prefer-function-type': ['error'],
Expand All @@ -296,7 +295,7 @@ module.exports = {
'@typescript-eslint/prefer-ts-expect-error': ['error'],
'@typescript-eslint/promise-function-async': ['error'],
'@typescript-eslint/require-array-sort-compare': ['error'],
'@typescript-eslint/sort-type-union-intersection-members': ['error'],
'@typescript-eslint/sort-type-constituents': ['error'],
'@typescript-eslint/strict-boolean-expressions': ['error',
{
allowString: true,
Expand All @@ -313,10 +312,6 @@ module.exports = {
'@typescript-eslint/triple-slash-reference': ['error'],
'@typescript-eslint/type-annotation-spacing': ['error'],
'@typescript-eslint/unified-signatures': ['error'],

// Import static analysis
'import/named': ['off'],

/* eslint-enable */
},
};

0 comments on commit 6ead149

Please sign in to comment.