Skip to content

Commit

Permalink
feat: add sort-keys-fix to tslint-config-base
Browse files Browse the repository at this point in the history
  • Loading branch information
ChiefORZ committed Jun 20, 2023
1 parent 0362d8d commit e5d6fe0
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 47 deletions.
99 changes: 52 additions & 47 deletions packages/base/lib/tslint-config.js
Original file line number Diff line number Diff line change
@@ -1,64 +1,69 @@
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint', 'simple-import-sort', 'import'],
parser: "@typescript-eslint/parser",
plugins: [
"@typescript-eslint",
"simple-import-sort",
"sort-keys-fix",
"import",
],
env: {
node: true,
es6: true,
},
ignorePatterns: ['.eslintrc.js'],
extends: ['eslint:recommended', 'plugin:eslint-comments/recommended'],
ignorePatterns: [".eslintrc.js"],
extends: ["eslint:recommended", "plugin:eslint-comments/recommended"],
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module',
project: ['./tsconfig.json'],
sourceType: "module",
project: ["./tsconfig.json"],
// debugLevel: true,
},
overrides: [
{
files: ['*.ts'],
files: ["*.ts"],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'plugin:prettier/recommended'
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:prettier/recommended",
],
rules: {
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/ban-types': 'off',
'@typescript-eslint/consistent-type-imports': 'error',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-empty-interface': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-misused-promises': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-unnecessary-type-assertion': 'off',
'@typescript-eslint/no-unsafe-argument': 'warn',
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-unsafe-return': 'off',
'@typescript-eslint/no-use-before-define': 'off',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/restrict-plus-operands': 'off',
'@typescript-eslint/restrict-template-expressions': 'off',
'eslint-comments/disable-enable-pair': 'error',
'eslint-comments/no-aggregating-enable': 'error',
'eslint-comments/no-duplicate-disable': 'error',
'eslint-comments/no-unlimited-disable': 'error',
'eslint-comments/no-unused-disable': 'error',
'eslint-comments/no-unused-enable': 'error',
'import/first': 'error',
'import/newline-after-import': 'error',
'import/no-duplicates': 'error',
'no-empty': 'off',
'no-useless-escape': 'off',
'prettier/prettier': 'warn',
'simple-import-sort/exports': 'error',
'simple-import-sort/imports': 'error'
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/ban-types": "off",
"@typescript-eslint/consistent-type-imports": "error",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-misused-promises": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-unnecessary-type-assertion": "off",
"@typescript-eslint/no-unsafe-argument": "warn",
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/no-unsafe-return": "off",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/restrict-plus-operands": "off",
"@typescript-eslint/restrict-template-expressions": "off",
"eslint-comments/disable-enable-pair": "error",
"eslint-comments/no-aggregating-enable": "error",
"eslint-comments/no-duplicate-disable": "error",
"eslint-comments/no-unlimited-disable": "error",
"eslint-comments/no-unused-disable": "error",
"eslint-comments/no-unused-enable": "error",
"import/first": "error",
"import/newline-after-import": "error",
"import/no-duplicates": "error",
"no-empty": "off",
"no-useless-escape": "off",
"prettier/prettier": "warn",
"simple-import-sort/exports": "error",
"simple-import-sort/imports": "error",
},
},
]
}
],
};
1 change: 1 addition & 0 deletions packages/base/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-prefer-arrow": "^1.2.3",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-sort-keys-fix": "^1.1.2",
"eslint-plugin-simple-import-sort": "^10.0.0",
"prettier": "^2.7.1",
"typescript": "^5.0.0"
Expand Down
3 changes: 3 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e5d6fe0

Please sign in to comment.