Skip to content

Commit

Permalink
chore: drop node 14, bump deps, stricter eslintrc (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
brc-dd committed Apr 22, 2023
1 parent 10d9376 commit d1451ad
Show file tree
Hide file tree
Showing 12 changed files with 1,356 additions and 1,337 deletions.
121 changes: 6 additions & 115 deletions .eslintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ extends:
- plugin:import/typescript
- plugin:security/recommended
- eslint:recommended
- plugin:@typescript-eslint/recommended
- plugin:@typescript-eslint/recommended-requiring-type-checking
- plugin:@typescript-eslint/all
- airbnb-base
- airbnb-typescript/base
- plugin:prettier/recommended
Expand All @@ -29,118 +28,10 @@ settings:
alwaysTryTypes: true
project: .
rules:
security/detect-object-injection: off # ts handles this
import/prefer-default-export: off
import/extensions: off
import/no-extraneous-dependencies: off
'@typescript-eslint/no-namespace': off
no-bitwise: off
'@typescript-eslint/array-type':
- error
- default: generic
'@typescript-eslint/ban-tslint-comment': error
'@typescript-eslint/class-literal-property-style': error
'@typescript-eslint/consistent-indexed-object-style': error
'@typescript-eslint/consistent-type-assertions': error
'@typescript-eslint/consistent-type-definitions': error
'@typescript-eslint/consistent-type-exports': error
'@typescript-eslint/consistent-type-imports':
- error
- disallowTypeAnnotations: false
'@typescript-eslint/explicit-function-return-type': error
'@typescript-eslint/explicit-member-accessibility': error
'@typescript-eslint/explicit-module-boundary-types': error
'@typescript-eslint/member-ordering': error
'@typescript-eslint/method-signature-style': error
'@typescript-eslint/naming-convention': error
'@typescript-eslint/no-base-to-string': error
'@typescript-eslint/no-confusing-non-null-assertion': error
'@typescript-eslint/no-confusing-void-expression': error
'@typescript-eslint/no-dynamic-delete': error
'@typescript-eslint/no-extraneous-class': error
'@typescript-eslint/no-invalid-void-type': error
'@typescript-eslint/no-meaningless-void-operator': error
'@typescript-eslint/no-non-null-asserted-nullish-coalescing': error
'@typescript-eslint/no-parameter-properties': error
'@typescript-eslint/no-require-imports': error
'@typescript-eslint/no-unnecessary-boolean-literal-compare': error
'@typescript-eslint/no-unnecessary-condition': error
'@typescript-eslint/no-unnecessary-qualifier': error
'@typescript-eslint/no-unnecessary-type-arguments': error
'@typescript-eslint/non-nullable-type-assertion-style': error
'@typescript-eslint/prefer-enum-initializers': error
'@typescript-eslint/prefer-for-of': error
'@typescript-eslint/prefer-function-type': error
'@typescript-eslint/prefer-includes': error
'@typescript-eslint/prefer-literal-enum-member': error
'@typescript-eslint/prefer-nullish-coalescing': error
'@typescript-eslint/prefer-optional-chain': error
'@typescript-eslint/prefer-readonly': error
'@typescript-eslint/prefer-reduce-type-parameter': error
'@typescript-eslint/prefer-regexp-exec': error
'@typescript-eslint/prefer-return-this-type': error
'@typescript-eslint/prefer-string-starts-ends-with': error
'@typescript-eslint/prefer-ts-expect-error': error
'@typescript-eslint/promise-function-async': error
'@typescript-eslint/require-array-sort-compare':
- error
- ignoreStringArrays: true
'@typescript-eslint/sort-type-union-intersection-members': error
'@typescript-eslint/strict-boolean-expressions': error
'@typescript-eslint/switch-exhaustiveness-check': error
'@typescript-eslint/type-annotation-spacing': error
'@typescript-eslint/typedef': error
'@typescript-eslint/unified-signatures': error
import/prefer-default-export: off
security/detect-object-injection: off

# Override/Extension Rules
brace-style: off
'@typescript-eslint/brace-style': error
comma-dangle: off
comma-spacing: off
'@typescript-eslint/comma-spacing': error
default-param-last: off
'@typescript-eslint/default-param-last': error
dot-notation: off
'@typescript-eslint/dot-notation': error
func-call-spacing: off
'@typescript-eslint/func-call-spacing': error
init-declarations: off
keyword-spacing: off
'@typescript-eslint/keyword-spacing': error
lines-between-class-members: off
'@typescript-eslint/lines-between-class-members': error
no-dupe-class-members: off
'@typescript-eslint/no-dupe-class-members': error
no-duplicate-imports: off
'@typescript-eslint/no-duplicate-imports': error
no-extra-parens: off
no-invalid-this: off
'@typescript-eslint/no-invalid-this': error
no-loop-func: off
'@typescript-eslint/no-loop-func': error
no-redeclare: off
'@typescript-eslint/no-redeclare': error
no-restricted-imports: off
'@typescript-eslint/no-restricted-imports': error
no-shadow: off
'@typescript-eslint/no-shadow': error
no-throw-literal: off
'@typescript-eslint/no-throw-literal': error
no-unused-expressions: off
'@typescript-eslint/no-unused-expressions': error
no-use-before-define: off
'@typescript-eslint/no-use-before-define': error
no-useless-constructor: off
'@typescript-eslint/no-useless-constructor': error
object-curly-spacing: off
'@typescript-eslint/object-curly-spacing': error
padding-line-between-statements: off
'@typescript-eslint/padding-line-between-statements': error
quotes: off
'@typescript-eslint/quotes': error
no-return-await: off
'@typescript-eslint/return-await': error
semi: off
space-before-function-paren: off
'@typescript-eslint/space-before-function-paren': error
space-infix-ops: off
'@typescript-eslint/space-infix-ops': error
'@typescript-eslint/no-type-alias': off
'@typescript-eslint/prefer-readonly-parameter-types': off
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
test-node:
strategy:
matrix:
node-version: [14, 16, 18, 19]
node-version: [16, 18, 20]
name: test (node-${{ matrix.node-version }})
runs-on: ubuntu-latest
steps:
Expand All @@ -32,7 +32,7 @@ jobs:
- uses: pnpm/action-setup@v2
- uses: actions/setup-node@v3
with:
node-version: 18
node-version: 20
cache: pnpm
- uses: denoland/setup-deno@v1
- uses: oven-sh/setup-bun@v1
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,5 +89,5 @@ thoroughly review the code.
@aws-sdk/util-base64
Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
https://cdn.jsdelivr.net/npm/@aws-sdk/util-base64@3.208.0/LICENSE
https://cdn.jsdelivr.net/npm/@aws-sdk/util-base64@3.310.0/LICENSE
```
2 changes: 1 addition & 1 deletion lefthook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ pre-commit:
run: pnpm prettier --write --ignore-unknown {all_files}
3_eslint:
glob: '*.ts'
run: pnpm eslint --fix {all_files} --max-warnings 10
run: pnpm eslint --fix {all_files} --max-warnings 1
38 changes: 18 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,38 +44,36 @@
"test:node": "NODE_OPTIONS='--loader tsx' node--test tests/node/index.test.ts"
},
"devDependencies": {
"@aws-sdk/util-base64": "^3.292.0",
"@commitlint/cli": "^17.4.4",
"@commitlint/config-conventional": "^17.4.4",
"@peculiar/webcrypto": "^1.4.1",
"@aws-sdk/util-base64": "^3.310.0",
"@commitlint/cli": "^17.6.1",
"@commitlint/config-conventional": "^17.6.1",
"@release-it/conventional-changelog": "^5.1.1",
"@types/node": "^18.15.3",
"@types/node": "^18.15.13",
"@types/semver": "^7.3.13",
"@typescript-eslint/eslint-plugin": "^5.55.0",
"@typescript-eslint/parser": "^5.55.0",
"bun-types": "^0.5.7",
"eslint": "^8.36.0",
"@typescript-eslint/eslint-plugin": "^5.59.0",
"@typescript-eslint/parser": "^5.59.0",
"bun-types": "^0.5.8",
"eslint": "^8.39.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-airbnb-typescript": "^17.0.0",
"eslint-config-prettier": "^8.7.0",
"eslint-config-prettier": "^8.8.0",
"eslint-import-resolver-node": "^0.3.7",
"eslint-import-resolver-typescript": "^3.5.3",
"eslint-import-resolver-typescript": "^3.5.5",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-security": "^1.7.1",
"lefthook": "^1.3.6",
"prettier": "^2.8.4",
"lefthook": "^1.3.10",
"prettier": "^2.8.7",
"prettier-plugin-packagejson": "^2.4.3",
"publint": "^0.1.10",
"release-it": "^15.9.0",
"publint": "^0.1.11",
"release-it": "^15.10.1",
"replace": "^1.2.2",
"semver": "^7.3.8",
"test": "^3.3.0",
"tsup": "^6.6.3",
"tsx": "^3.12.5",
"typescript": "^5.0.2"
"tsup": "^6.7.0",
"tsx": "^3.12.6",
"typescript": "^5.0.4"
},
"packageManager": "pnpm@7.29.3",
"packageManager": "pnpm@8.3.1",
"publishConfig": {
"registry": "https://registry.npmjs.org"
}
Expand Down

0 comments on commit d1451ad

Please sign in to comment.