Skip to content

Commit

Permalink
modernize toolchains
Browse files Browse the repository at this point in the history
  • Loading branch information
legokichi committed Feb 21, 2024
1 parent ec972e4 commit 0cf69b9
Show file tree
Hide file tree
Showing 99 changed files with 6,701 additions and 53,168 deletions.
103 changes: 103 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
{
"root": true,
"env": {
"browser": true,
"es2019": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/strict",
"plugin:@typescript-eslint/strict-type-checked",
"prettier"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {},
"ecmaVersion": 13,
"sourceType": "module",
"project": "./tsconfig.json"
},
"plugins": [
"@typescript-eslint"
],
"rules": {
// possible problems
"array-callback-return": "error",
"no-await-in-loop": "off",
"no-constant-binary-expression": "error",
"no-constructor-return": "error",
"no-constant-condition": "off",
"no-duplicate-imports": "error",
"no-new-native-nonconstructor": "error",
"no-self-compare": "error",
"no-template-curly-in-string": "error",
"no-unmodified-loop-condition": "error",
"no-unreachable-loop": "error",
"no-unused-private-class-members": "error",
"no-unused-vars": [
"off",
{
"argsIgnorePattern": "^_"
}
],
"no-use-before-define": "off",
"require-atomic-updates": "error",
// suggestions
"accessor-pairs": "error",
"arrow-body-style": "error",
"block-scoped-var": "error",
"camelcase": "off",
"class-methods-use-this": "error",
"complexity": "off",
"consistent-return": "error",
"consistent-this": "error",
"curly": "error",
"default-case": "off",
"default-case-last": "off",
"default-param-last": "error",
"dot-notation": "off",
"eqeqeq": ["error", "smart"],
"func-name-matching": "error",
"func-names": ["error", "always"],
"func-style": ["error", "declaration"],
"grouped-accessor-pairs": "error",
"guard-for-in": "error",
"id-denylist": "off",
"id-length": "off",
"id-match": "off",
"init-declarations": ["error", "always"],
"logical-assignment-operators": ["error", "always"],

"prefer-spread": "off",

"no-unused-labels": "off",
"no-labels": "off",
"no-empty-pattern": "off",
"no-inner-declarations": "off",
"no-extra-label": "off",

"radix": "error",
"require-await": "off",

// Layout & Formatting
"line-comment-position": ["error", { "position": "above" }],
"unicode-bom": ["error", "always"],

"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/ban-types": "error",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-unnecessary-condition": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/no-unsafe-argument": "off",
"@typescript-eslint/consistent-type-assertions": ["error", { "assertionStyle": "as", "objectLiteralTypeAssertions": "allow" }],
"@typescript-eslint/no-unsafe-return": "off",
"@typescript-eslint/prefer-promise-reject-errors": "off",
"@typescript-eslint/unified-signatures": "off"
}
}
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ jobs:
node-version: ${{ matrix.node-version }}

- name: Init
run: npm run init
run: npm ci

- name: Build
run: npm run build
run: npm run build && npm run build_test

- name: Lint
run: npm run lint
Expand All @@ -36,5 +36,5 @@ jobs:
- name: Test
run: npm test

- name: Examples
run: npm run examples
- name: Diff
run: git diff --exit-code
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
node_modules/
dist/
package-lock.json
dist/test.js
test-results/
5 changes: 3 additions & 2 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
*.log
.DS_Store
log.txt*
dist/
dist/test.js
matroska-test-files/
mkclean-*/
mkvalidator-*/
node_modules/
test/
test/.DS_Store
test/.DS_Store
test-results/
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v20
5 changes: 5 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"arrowParens": "always",
"trailingComma": "none",
"proseWrap": "never"
}
Loading

0 comments on commit 0cf69b9

Please sign in to comment.