Skip to content

Commit 4498378

Browse files
committed
Tools: Add biome config, for editors. Remove js check on tsconfig. Types only
1 parent 29d7d09 commit 4498378

File tree

12 files changed

+96
-22
lines changed

12 files changed

+96
-22
lines changed

biome.json

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/2.2.0/schema.json",
3+
"vcs": { "enabled": false, "clientKind": "git", "useIgnoreFile": false },
4+
"files": { "ignoreUnknown": false },
5+
"formatter": { "enabled": false, "indentStyle": "space" },
6+
"linter": {
7+
"enabled": true,
8+
"rules": {
9+
"recommended": false,
10+
"complexity": {
11+
"noAdjacentSpacesInRegex": "off",
12+
"noCommaOperator": "warn",
13+
"noExtraBooleanCast": "warn",
14+
"noUselessLoneBlockStatements": "warn",
15+
"noUselessUndefinedInitialization": "off",
16+
"noVoid": "off",
17+
"useLiteralKeys": "off"
18+
},
19+
"correctness": {
20+
"noConstantCondition": "warn",
21+
"noUnusedFunctionParameters": "off",
22+
"noGlobalObjectCalls": "off",
23+
"noInnerDeclarations": "off",
24+
"noInvalidUseBeforeDeclaration": "warn",
25+
"noUndeclaredVariables": "off",
26+
"noUnreachable": "error",
27+
"noUnusedVariables": "warn",
28+
"useIsNan": "off",
29+
"useParseIntRadix": "error",
30+
"useValidTypeof": "off"
31+
},
32+
"security": { "noGlobalEval": "error" },
33+
"style": {
34+
"noNestedTernary": "off",
35+
"noYodaExpression": "error",
36+
"useArrayLiterals": "off",
37+
"useBlockStatements": "warn",
38+
"useCollapsedElseIf": "off",
39+
"useConsistentBuiltinInstantiation": "warn",
40+
"useDefaultSwitchClause": "off",
41+
"useShorthandAssign": "off",
42+
"useSingleVarDeclarator": "off"
43+
},
44+
"suspicious": {
45+
"noAlert": "warn",
46+
"noCatchAssign": "off",
47+
"noConsole": "off",
48+
"noControlCharactersInRegex": "off",
49+
"noDebugger": "off",
50+
"noDoubleEquals": "off",
51+
"noDuplicateObjectKeys": "error",
52+
"noEmptyBlockStatements": "warn",
53+
"noFallthroughSwitchClause": "off",
54+
"noFunctionAssign": "off",
55+
"noIrregularWhitespace": "warn",
56+
"noLabelVar": "error",
57+
"noOctalEscape": "off",
58+
"noRedeclare": "warn",
59+
"noSelfCompare": "warn",
60+
"noShadowRestrictedNames": "off",
61+
"noSparseArray": "warn",
62+
"noVar": "warn",
63+
"noWith": "off",
64+
"useGuardForIn": "off"
65+
}
66+
}
67+
},
68+
"javascript": { "formatter": { "quoteStyle": "single" }, "globals": ["_"] },
69+
"assist": {
70+
"enabled": true,
71+
"actions": { "source": { "organizeImports": "on" } }
72+
}
73+
}

docs/src/helpers/injections.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -653,7 +653,7 @@ export const getIndexHTMLBefore = function({ files = {}, includeLog } = {}) {
653653
return html;
654654
};
655655

656-
return `<!DOCTYPE html><html>
656+
return `<!DOCTYPE html>
657657
<head>
658658
${hideCode({ text: headLibraryJS, isHTML: true })} ${getScriptCode()} </head>
659659
<body>

docs/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"baseUrl": ".",
66
"strictNullChecks": true,
77
"allowJs": true,
8-
"checkJs": true,
8+
"checkJs": false,
99
"noImplicitAny": false,
1010
"skipLibCheck": true,
1111
"noEmit": true,

packages/component/tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"compilerOptions": {
33
"allowJs": true,
4-
"checkJs": true,
4+
"checkJs": false,
55
"noEmit": true,
66
"declaration": true,
77
"declarationDir": "./types",
@@ -10,7 +10,7 @@
1010
"module": "ESNext",
1111
"target": "es2020",
1212
"lib": ["es2020", "dom"],
13-
"strict": true,
13+
"strict": false,
1414
"skipLibCheck": true,
1515
"noImplicitAny": false,
1616
"noImplicitThis": false

packages/query/src/behavior.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ export class Behavior {
177177
// 'global eventType selector' - attach event to an element on the page
178178
// 'bind selector' - bind to an element directly
179179
let eventType = 'delegate';
180-
let keywords = ['global', 'bind'];
180+
const keywords = ['global', 'bind'];
181181
each(keywords, (keyword) => {
182182
if (eventString.startsWith(keyword)) {
183183
eventString = eventString.replace(keyword, '');
@@ -466,7 +466,7 @@ export class Behavior {
466466
eventSettings = {},
467467
{ $elements = this.$elements, namespace = this.namespace } = {},
468468
) {
469-
return $elements.get().map(element => {
469+
return $elements.get().forEach(element => {
470470
this.dispatchEvent(eventName, detail, eventSettings, { element, namespace });
471471
});
472472
}
@@ -619,7 +619,7 @@ export class Behavior {
619619
}
620620

621621
// this allows for a setup() function to return values shared across behaviors
622-
static runSetup(setup = function() {}, { $elements, settings, templates } = {}) {
622+
static runSetup(setup = function(args) {}, { $elements, settings, templates } = {}) {
623623
const $ = (selector, options) => new $elements.constructor(selector, options);
624624
return setup({ $, settings, $elements, templates });
625625
}

packages/query/tsconfig.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"compilerOptions": {
33
"allowJs": true,
4-
"checkJs": true,
4+
"checkJs": false,
55
"noEmit": true,
66
"declaration": true,
77
"declarationDir": "./types",
@@ -10,10 +10,11 @@
1010
"module": "ESNext",
1111
"target": "es2020",
1212
"lib": ["es2020", "dom"],
13-
"strict": true,
13+
"strict": false,
1414
"skipLibCheck": true,
1515
"noImplicitAny": false,
16-
"noImplicitThis": false
16+
"noImplicitThis": false,
17+
"suppressImplicitAnyIndexErrors": true
1718
},
1819
"include": ["src/**/*"],
1920
"exclude": ["node_modules"]

packages/reactivity/tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
"module": "ESNext",
55
"lib": ["ESNext", "DOM"],
66
"allowJs": true,
7-
"checkJs": true,
7+
"checkJs": false,
88
"noEmit": true,
99
"rootDir": "./",
1010

11-
"strict": true,
11+
"strict": false,
1212
"noImplicitAny": false,
1313
"noImplicitThis": false,
1414

packages/renderer/tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"compilerOptions": {
33
"allowJs": true,
4-
"checkJs": true,
4+
"checkJs": false,
55
"noEmit": true,
66
"declaration": true,
77
"declarationDir": "./types",
@@ -10,7 +10,7 @@
1010
"module": "ESNext",
1111
"target": "es2020",
1212
"lib": ["es2020", "dom"],
13-
"strict": true,
13+
"strict": false,
1414
"skipLibCheck": true,
1515
"noImplicitAny": false,
1616
"noImplicitThis": false

packages/specs/tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"compilerOptions": {
33
"allowJs": true,
4-
"checkJs": true,
4+
"checkJs": false,
55
"noEmit": true,
66
"declaration": true,
77
"declarationDir": "./types",
@@ -10,7 +10,7 @@
1010
"module": "ESNext",
1111
"target": "es2020",
1212
"lib": ["es2020", "dom"],
13-
"strict": true,
13+
"strict": false,
1414
"skipLibCheck": true,
1515
"noImplicitAny": false,
1616
"noImplicitThis": false

packages/tailwind/tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"compilerOptions": {
33
"allowJs": true,
4-
"checkJs": true,
4+
"checkJs": false,
55
"noEmit": true,
66
"declaration": true,
77
"declarationDir": "./types",
@@ -10,7 +10,7 @@
1010
"module": "ESNext",
1111
"target": "es2020",
1212
"lib": ["es2020", "dom"],
13-
"strict": true,
13+
"strict": false,
1414
"skipLibCheck": true,
1515
"noImplicitAny": false,
1616
"noImplicitThis": false

0 commit comments

Comments
 (0)