-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
026feda
commit 6ca978e
Showing
19 changed files
with
201 additions
and
311 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,3 +23,4 @@ jobs: | |
- run: npm install | ||
- run: npm test | ||
- run: npm run lint | ||
- run: npm run type-check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,8 @@ | ||
.github/ | ||
.eslintrc.json | ||
eslint.config.js | ||
**/*.spec.ts | ||
tsconfig.json | ||
lib/jref/SPECIFICATION.md | ||
scratch/ | ||
TODO | ||
rollup.config.js | ||
dist/ | ||
lib/urn-scheme-plugin.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
import js from "@eslint/js"; | ||
import stylistic from "@stylistic/eslint-plugin"; | ||
import importPlugin from "eslint-plugin-import"; | ||
import globals from "globals"; | ||
import tseslint from "typescript-eslint"; | ||
|
||
|
||
export default [ | ||
js.configs.recommended, | ||
...tseslint.configs.recommendedTypeChecked, | ||
...tseslint.configs.stylisticTypeChecked, | ||
importPlugin.flatConfigs.recommended, | ||
stylistic.configs.customize({ | ||
arrowParens: true, | ||
braceStyle: "1tbs", | ||
commaDangle: "never", | ||
flat: true, | ||
jsx: false, | ||
quotes: "double", | ||
semi: true | ||
}), | ||
{ | ||
languageOptions: { | ||
ecmaVersion: "latest", | ||
globals: { | ||
...globals.node | ||
}, | ||
parserOptions: { | ||
projectService: true, | ||
tsconfigRootDir: import.meta.dirname | ||
} | ||
}, | ||
settings: { | ||
"import/resolver": { | ||
node: {}, | ||
typescript: {} | ||
} | ||
}, | ||
rules: { | ||
// JavaScript | ||
"no-console": ["error"], | ||
"no-empty-function": "off", | ||
"no-fallthrough": "off", | ||
|
||
// TypeScript | ||
"@typescript-eslint/no-unused-vars": ["error", { caughtErrorsIgnorePattern: "^_" }], | ||
"@typescript-eslint/no-empty-function": "off", | ||
"@typescript-eslint/consistent-type-definitions": ["error", "type"], | ||
|
||
// Imports | ||
"import/extensions": ["error", "ignorePackages"], | ||
"import/newline-after-import": ["error", { count: 2, exactCount: false, considerComments: true }], | ||
|
||
// Stylistic | ||
"@stylistic/multiline-ternary": "off", | ||
"@stylistic/no-mixed-operators": "off", | ||
"@stylistic/no-multiple-empty-lines": ["error", { max: 2, maxEOF: 0, maxBOF: 0 }], // Allow max=2 for imports | ||
"@stylistic/quote-props": ["error", "consistent"], | ||
"@stylistic/yield-star-spacing": ["error", "after"] | ||
} | ||
}, | ||
{ | ||
files: ["**/*.js"], | ||
...tseslint.configs.disableTypeChecked | ||
} | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.