Skip to content

Commit

Permalink
feat: use standard-ts for linting
Browse files Browse the repository at this point in the history
  • Loading branch information
steabert committed Apr 4, 2021
1 parent c518066 commit b98c1d8
Show file tree
Hide file tree
Showing 8 changed files with 151 additions and 24 deletions.
19 changes: 0 additions & 19 deletions .eslintrc.json

This file was deleted.

29 changes: 29 additions & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
extends:
- 'standard-with-typescript'
- 'prettier'

parserOptions:
project: './tsconfig.json'

rules:
'no-case-declarations': 'off'
'array-callback-return': 'off'
'no-multi-str': 'off'
'no-useless-escape': 'off'
'node/no-deprecated-api': 'off'
'@typescript-eslint/explicit-function-return-type': 'off'
'@typescript-eslint/no-misused-promises': 'off'
'@typescript-eslint/no-extraneous-class': 'off'
'@typescript-eslint/prefer-optional-chain': 'off'
'@typescript-eslint/prefer-nullish-coalescing': 'off'
'@typescript-eslint/restrict-template-expressions': 'off'
'@typescript-eslint/restrict-plus-operands': 'off'
'@typescript-eslint/strict-boolean-expressions': 'off'

overrides:
###
# Test file overrides
###
- files: ['**/*.test.ts']
env:
jest: true
82 changes: 82 additions & 0 deletions .pnp.js

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

Binary file not shown.
Binary file not shown.
4 changes: 4 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ packageExtensions:
stream-browserify@*:
dependencies:
events: "*"
eslint-module-utils@*:
dependencies:
eslint: "*"
eslint-import-resolver-node: "*"

plugins:
- path: .yarn/plugins/@yarnpkg/plugin-version.cjs
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@
"CHANGELOG.md"
],
"scripts": {
"lint": "yarn eslint && yarn prettier:check",
"lint": "yarn lint:ts && yarn prettier:check",
"test": "jest --coverage",
"verify": "yarn lint && yarn test",
"build": "yarn build:esm && yarn build:cjs && yarn build:es5 && yarn build:bundle",
"build:esm": "tsc -p tsconfig.json",
"build:cjs": "tsc -p tsconfig.cjs.json",
"build:es5": "tsc -p tsconfig.es5.json",
"build:bundle": "webpack && sbin/copyMinified.sh",
"eslint": "eslint --ext '.ts,.js' lib/",
"lint:ts": "eslint --ext '.ts' lib/",
"prettier:check": "prettier --check '{lib,examples}/**/*.{ts,js}'",
"prettier:fix": "prettier --write '{lib,examples}/**/*.{ts,js}' --fix --loglevel silent",
"rtsp": "rtsp-ws-server/start.sh",
Expand Down Expand Up @@ -69,6 +69,7 @@
"cypress": "6.8.0",
"eslint": "7.23.0",
"eslint-config-prettier": "8.1.0",
"eslint-config-standard-with-typescript": "20.0.0",
"eslint-plugin-import": "2.22.1",
"eslint-plugin-node": "11.1.0",
"eslint-plugin-promise": "4.3.1",
Expand Down
36 changes: 33 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2324,7 +2324,7 @@ __metadata:
languageName: node
linkType: hard

"@typescript-eslint/parser@npm:4.20.0":
"@typescript-eslint/parser@npm:4.20.0, @typescript-eslint/parser@npm:^4.0.0":
version: 4.20.0
resolution: "@typescript-eslint/parser@npm:4.20.0"
dependencies:
Expand Down Expand Up @@ -4285,7 +4285,36 @@ __metadata:
languageName: node
linkType: hard

"eslint-import-resolver-node@npm:^0.3.4":
"eslint-config-standard-with-typescript@npm:20.0.0":
version: 20.0.0
resolution: "eslint-config-standard-with-typescript@npm:20.0.0"
dependencies:
"@typescript-eslint/parser": ^4.0.0
eslint-config-standard: ^16.0.0
peerDependencies:
"@typescript-eslint/eslint-plugin": ">=4.0.1"
eslint: ">=7.12.1"
eslint-plugin-import: ">=2.22.1"
eslint-plugin-node: ">=11.1.0"
eslint-plugin-promise: ">=4.2.1"
typescript: ">=3.9"
checksum: d5f85efbb74f6ab09bd66ede24d6eea0bf3e54ec37dd3c8608fa66f78018faba1a16baa8e32c846ccd42de3282065c66384893c22e85948a415c0a226e3475fc
languageName: node
linkType: hard

"eslint-config-standard@npm:^16.0.0":
version: 16.0.2
resolution: "eslint-config-standard@npm:16.0.2"
peerDependencies:
eslint: ^7.12.1
eslint-plugin-import: ^2.22.1
eslint-plugin-node: ^11.1.0
eslint-plugin-promise: ^4.2.1
checksum: 9db750eab1fb190deed50cd1b52df94f517142b6bc73edc38d22dc1ccb28ee628d969028017536d65301fbd15daf1487d7b7420f7c2689477f73bb213f6a25fc
languageName: node
linkType: hard

"eslint-import-resolver-node@npm:*, eslint-import-resolver-node@npm:^0.3.4":
version: 0.3.4
resolution: "eslint-import-resolver-node@npm:0.3.4"
dependencies:
Expand Down Expand Up @@ -4406,7 +4435,7 @@ __metadata:
languageName: node
linkType: hard

"eslint@npm:7.23.0":
"eslint@npm:*, eslint@npm:7.23.0":
version: 7.23.0
resolution: "eslint@npm:7.23.0"
dependencies:
Expand Down Expand Up @@ -6869,6 +6898,7 @@ fsevents@^2.1.2:
debug: 4.3.1
eslint: 7.23.0
eslint-config-prettier: 8.1.0
eslint-config-standard-with-typescript: 20.0.0
eslint-plugin-import: 2.22.1
eslint-plugin-node: 11.1.0
eslint-plugin-promise: 4.3.1
Expand Down

0 comments on commit b98c1d8

Please sign in to comment.