Skip to content

Commit

Permalink
Merge pull request #7 from LucienHH/Typescript-Rewrite
Browse files Browse the repository at this point in the history
Typescript rewrite
  • Loading branch information
LucienHH committed Feb 18, 2024
2 parents f1b29a6 + 10371a8 commit b52d4ed
Show file tree
Hide file tree
Showing 36 changed files with 1,916 additions and 1,726 deletions.
95 changes: 51 additions & 44 deletions .eslintrc.json
@@ -1,46 +1,53 @@
{
"extends": "eslint:recommended",
"env": {
"node": true,
"es2022": true
},
"rules": {
"eol-last": ["error", "always"],
"brace-style": ["error", "stroustrup", { "allowSingleLine": true }],
"comma-dangle": ["error", "always-multiline"],
"comma-spacing": "error",
"comma-style": "error",
"curly": ["error", "multi-line", "consistent"],
"dot-location": ["error", "property"],
"handle-callback-err": "off",
"indent": ["error", 2, { "SwitchCase": 1 }],
"max-nested-callbacks": ["error", { "max": 4 }],
"max-statements-per-line": ["error", { "max": 2 }],
"no-console": "off",
"quote-props": ["error", "consistent-as-needed"],
"no-empty-function": "off",
"no-floating-decimal": "error",
"no-inline-comments": "off",
"no-lonely-if": "error",
"no-multi-spaces": "error",
"no-multiple-empty-lines": ["error", { "max": 2, "maxEOF": 1, "maxBOF": 0 }],
"no-shadow": ["error", { "allow": ["err", "resolve", "reject"] }],
"no-trailing-spaces": ["error"],
"no-unused-vars": ["warn", { "argsIgnorePattern": "^_" }],
"no-var": "error",
"object-curly-spacing": ["error", "always"],
"prefer-const": "error",
"quotes": ["error", "single"],
"semi": ["error", "always"],
"space-before-blocks": "error",
"space-before-function-paren": ["error", {
"anonymous": "never",
"named": "never",
"asyncArrow": "always"
}],
"space-in-parens": "error",
"space-infix-ops": "error",
"space-unary-ops": "error",
"spaced-comment": "error"
}
"env": {
"es6": true,
"node": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended"
],
"parser": "@typescript-eslint/parser",
"plugins": [
"@typescript-eslint"
],
"rules": {
"@typescript-eslint/no-explicit-any": ["warn", { "ignoreRestArgs": true }],
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/no-unused-vars": ["warn", { "argsIgnorePattern": "^_" }],
"indent": ["error", 2, { "SwitchCase": 1 }],
"brace-style": ["error", "stroustrup", { "allowSingleLine": true }],
"comma-dangle": ["error", "always-multiline"],
"comma-spacing": "error",
"comma-style": "error",
"curly": ["error", "multi-line", "consistent"],
"dot-location": ["error", "property"],
"handle-callback-err": "off",
"max-nested-callbacks": ["error", { "max": 4 }],
"max-statements-per-line": ["error", { "max": 2 }],
"quote-props": ["error", "consistent-as-needed"],
"no-empty-function": "off",
"no-floating-decimal": "error",
"no-inline-comments": "off",
"no-lonely-if": "error",
"no-multi-spaces": "error",
"no-multiple-empty-lines": ["error", { "max": 2, "maxEOF": 1, "maxBOF": 0 }],
"no-trailing-spaces": ["error"],
"no-unused-vars": ["warn", { "argsIgnorePattern": "^_" }],
"no-var": "error",
"object-curly-spacing": ["error", "always"],
"prefer-const": "error",
"quotes": ["error", "single"],
"semi": ["error", "never"],
"space-before-blocks": "error",
"space-before-function-paren": ["error", {
"anonymous": "never",
"named": "never",
"asyncArrow": "always"
}],
"space-in-parens": "error",
"space-infix-ops": "error",
"space-unary-ops": "error",
"spaced-comment": "error"
}
}
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Expand Up @@ -48,7 +48,7 @@ jobs:
strategy:
fail-fast: false
matrix:
language: [ 'javascript' ]
language: [ 'typescript' ]
os: [ 'ubuntu-20.04', 'ubuntu-22.04', 'macos-11', 'macos-12', 'macos-13', 'windows-2019', 'windows-latest' ]
node: [ 16.x, 18.x, 20.x ]

Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/publish.yml
Expand Up @@ -14,6 +14,10 @@ jobs:
uses: actions/setup-node@master
with:
node-version: 14.0.0
- name: Install dependencies
run: npm install --include=dev
- name: Build
run: npm run build
- id: publish
uses: JS-DevTools/npm-publish@v1
with:
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Expand Up @@ -2,4 +2,6 @@ package-lock.json
node_modules/
archive
.vscode
*-cache.json
*-cache.json
dist/
examples/research
11 changes: 11 additions & 0 deletions .npmignore
@@ -0,0 +1,11 @@
node_modules/
.github/
.env*
.gitignore
.eslintrc.json
.npmignore
HISTORY.md
tsconfig.json
examples/
src/
*-cache.json

0 comments on commit b52d4ed

Please sign in to comment.