Skip to content

Commit bf84ebb

Browse files
committed
improved lint & webpack for dev
1 parent dbbc418 commit bf84ebb

42 files changed

Lines changed: 2450 additions & 1487 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

babel.config.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ export default {
33
['@babel/preset-env', { targets: { node: 'current' } }],
44
'@babel/preset-typescript'
55
],
6-
"plugins": [
6+
plugins: [
77
[
8-
"babel-plugin-inline-import", {
9-
"extensions": [
10-
".ttl"
8+
'babel-plugin-inline-import', {
9+
extensions: [
10+
'.ttl'
1111
]
1212
}
1313
]

eslint.config.mjs

Lines changed: 36 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,43 @@
1-
import typescriptEslint from "@typescript-eslint/eslint-plugin";
2-
import globals from "globals";
3-
import tsParser from "@typescript-eslint/parser";
1+
import tseslintPlugin from '@typescript-eslint/eslint-plugin'
2+
import globals from 'globals'
3+
import tsParser from '@typescript-eslint/parser'
4+
import neostandard from 'neostandard'
45

5-
export default [{
6-
ignores: ["**/dist", "**/lib", "typings/rdflib"],
7-
}, {
6+
export default [
7+
...neostandard(),
8+
{
9+
ignores: [
10+
'dist/**',
11+
'test/**',
12+
'docs/**',
13+
'node_modules/**',
14+
'dev/**',
15+
'coverage/**',
16+
],
17+
},
18+
{
19+
files: ['src/**/*.js', 'src/**/*.ts', 'src/**/*.cjs', 'src/**/*.mjs'],
820
plugins: {
9-
"@typescript-eslint": typescriptEslint,
21+
'@typescript-eslint': tseslintPlugin,
1022
},
1123

1224
languageOptions: {
13-
globals: {
14-
...globals.browser,
15-
...globals.node,
16-
Atomics: "readonly",
17-
SharedArrayBuffer: "readonly",
18-
},
19-
20-
parser: tsParser,
25+
globals: {
26+
...globals.browser,
27+
...globals.node,
28+
Atomics: 'readonly',
29+
SharedArrayBuffer: 'readonly',
30+
},
31+
parser: tsParser,
2132
},
22-
files: ["src/**/*.js", "src/**/*.ts", "src/**/*.cjs", "src/**/*.mjs"],
2333
rules: {
24-
"no-unused-vars": ["warn", {
25-
argsIgnorePattern: "^_",
26-
varsIgnorePattern: "^_",
27-
}],
28-
29-
"@typescript-eslint/no-unused-vars": ["warn", {
30-
argsIgnorePattern: "^_",
31-
varsIgnorePattern: "^_",
32-
}],
33-
},
34-
}];
34+
semi: ['error', 'never'],
35+
quotes: ['error', 'single'],
36+
'no-unused-vars': 'off', // handled by TS
37+
'@typescript-eslint/no-unused-vars': ['warn', {
38+
argsIgnorePattern: '^_',
39+
varsIgnorePattern: '^_',
40+
}]
41+
}
42+
}
43+
]

0 commit comments

Comments
 (0)