Skip to content

Commit f4ed069

Browse files
authored
remove eslint (#571)
1 parent 3204237 commit f4ed069

Some content is hidden

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

60 files changed

+8719
-5309
lines changed

.dprint.json

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"typescript": {
3+
"semiColons": "asi",
4+
"quoteStyle": "alwaysSingle",
5+
"trailingCommas": "never",
6+
"arrowFunction.useParentheses": "force",
7+
"method.spaceBeforeParentheses": true,
8+
"setAccessor.spaceBeforeParentheses": true,
9+
"constructor.spaceBeforeParentheses": true,
10+
"getAccessor.spaceBeforeParentheses": true,
11+
"functionDeclaration.spaceBeforeParentheses": true,
12+
"newLineKind": "lf"
13+
},
14+
"excludes": [
15+
"**/node_modules",
16+
"**/*-lock.json",
17+
"translations/*.json",
18+
"dist"
19+
],
20+
"plugins": [
21+
"https://plugins.dprint.dev/typescript-0.88.7.wasm"
22+
]
23+
}

.eslintrc.js

-112
This file was deleted.

biome.json

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/1.4.1/schema.json",
3+
"organizeImports": {
4+
"enabled": true
5+
},
6+
"linter": {
7+
"enabled": true,
8+
"rules": {
9+
"recommended": true,
10+
"style": {
11+
"noNonNullAssertion": "off",
12+
"noUselessElse": "off",
13+
"noParameterAssign": "off",
14+
"useExponentiationOperator": "off"
15+
},
16+
"suspicious": {
17+
"noConfusingVoidType": "off",
18+
"noAssignInExpressions": "off",
19+
"noGlobalIsFinite": "off",
20+
"noGlobalIsNan": "off"
21+
},
22+
"complexity": {
23+
"noUselessTypeConstraint": "off",
24+
"noForEach": "off"
25+
}
26+
},
27+
"ignore": ["dist", "node_modules"]
28+
},
29+
"formatter": {
30+
"enabled": false
31+
},
32+
"json": {
33+
"formatter": {
34+
"enabled": false
35+
},
36+
"parser": {
37+
"allowComments": true
38+
}
39+
}
40+
}

package.json

+6-5
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,21 @@
1313
"worker-timers": "^7.0.53"
1414
},
1515
"devDependencies": {
16+
"@biomejs/biome": "^1.4.1",
1617
"@types/lz-string": "^1.3.34",
17-
"@typescript-eslint/eslint-plugin": "^5.57.1",
18-
"@typescript-eslint/parser": "^5.57.1",
18+
"dprint": "^0.45.0",
1919
"esbuild": "^0.17.15",
20-
"eslint": "^8.37.0",
2120
"htmlhint": "^1.1.4",
2221
"husky": "^8.0.3",
2322
"stylelint": "^14.8.2",
2423
"stylelint-config-standard": "^25.0.0",
2524
"typescript": "^5.0.3"
2625
},
2726
"scripts": {
28-
"lint": "npx eslint . --ext .ts",
29-
"lint:fix": "npx eslint . --ext .ts --fix",
27+
"lint": "npx @biomejs/biome lint .",
28+
"lint:fix": "npx @biomejs/biome lint --apply .",
29+
"lint:fix-unsafe": "npx @biomejs/biome lint --apply-unsafe .",
30+
"fmt": "npx dprint fmt",
3031
"csslint": "npx stylelint Synergism.css",
3132
"csslint:fix": "npx stylelint Synergism.css --fix",
3233
"htmllint": "npx htmlhint index.html",

scripts/transform.js

+16-16
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
1-
const { readFileSync, writeFileSync } = require('fs');
1+
const { readFileSync, writeFileSync } = require('fs')
22

3-
const SynergismCss = `${__dirname}/../Synergism.css`;
3+
const SynergismCss = `${__dirname}/../Synergism.css`
44
// https://stackoverflow.com/a/41407246/15299271
55

66
try {
7-
const css = readFileSync(SynergismCss, 'utf-8');
8-
const cssLines = css.split('\n');
7+
const css = readFileSync(SynergismCss, 'utf-8')
8+
const cssLines = css.split('\n')
99

10-
const idx = cssLines.findIndex(l => l.startsWith('body {'));
11-
12-
if (idx === -1) {
13-
throw new Error('body { element not found in CSS!');
14-
}
10+
const idx = cssLines.findIndex((l) => l.startsWith('body {'))
1511

16-
console.log(`\x1b[33m%s\x1b[0m`, `Found body element index: ${idx}.`);
17-
cssLines.splice(idx + 1, 0, `\ttransform: scale(0.8, 0.8);`);
18-
writeFileSync(SynergismCss, cssLines.join('\n'));
19-
console.log(`\x1b[32m%s\x1b[0m`, `Wrote Synergism.css file with transform property!`);
12+
if (idx === -1) {
13+
throw new Error('body { element not found in CSS!')
14+
}
15+
16+
console.log('\x1b[33m%s\x1b[0m', `Found body element index: ${idx}.`)
17+
cssLines.splice(idx + 1, 0, '\ttransform: scale(0.8, 0.8);')
18+
writeFileSync(SynergismCss, cssLines.join('\n'))
19+
console.log('\x1b[32m%s\x1b[0m', 'Wrote Synergism.css file with transform property!')
2020
} catch (e) {
21-
console.log(e);
22-
process.exit(1);
23-
}
21+
console.log(e)
22+
process.exit(1)
23+
}

scripts/update-last-updated.js

+26-26
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,39 @@
1-
const {readFileSync, writeFileSync} = require('fs');
2-
3-
const currentDate = new Date();
4-
const UTC = `Date.UTC(${currentDate.getUTCFullYear()}, ${currentDate.getUTCMonth()}, ${currentDate.getUTCDate()}, ${currentDate.getUTCHours()}, ${currentDate.getUTCMinutes()}, ${currentDate.getUTCSeconds()})`;
5-
console.log('\x1b[33m%s\x1b[0m', `Updating last updated config date to ${UTC}`);
1+
const { readFileSync, writeFileSync } = require('fs')
62

3+
const currentDate = new Date()
4+
const UTC =
5+
`Date.UTC(${currentDate.getUTCFullYear()}, ${currentDate.getUTCMonth()}, ${currentDate.getUTCDate()}, ${currentDate.getUTCHours()}, ${currentDate.getUTCMinutes()}, ${currentDate.getUTCSeconds()})`
6+
console.log('\x1b[33m%s\x1b[0m', `Updating last updated config date to ${UTC}`)
77

88
try {
9-
console.log('\x1b[33m%s\x1b[0m', 'Reading file & updating ##LAST_UPDATED##')
10-
let config = readFileSync(`${__dirname}/../src/Config.ts`, 'utf-8');
9+
console.log('\x1b[33m%s\x1b[0m', 'Reading file & updating ##LAST_UPDATED##')
10+
let config = readFileSync(`${__dirname}/../src/Config.ts`, 'utf-8')
1111

12-
if (!/'##LAST_UPDATED##'/g.test(config)) {
13-
throw new Error('File does not contain the \'##LAST_UPDATED##\' placeholder');
14-
}
12+
if (!/'##LAST_UPDATED##'/g.test(config)) {
13+
throw new Error('File does not contain the \'##LAST_UPDATED##\' placeholder')
14+
}
1515

16-
config = config.replace(/'##LAST_UPDATED##'/g, UTC);
16+
config = config.replace(/'##LAST_UPDATED##'/g, UTC)
1717

18-
if (!/Date\.UTC\(/g.test(config)) {
19-
throw new Error('Couldn\'t replace the placeholder');
20-
}
18+
if (!/Date\.UTC\(/g.test(config)) {
19+
throw new Error('Couldn\'t replace the placeholder')
20+
}
2121

22-
console.log('\x1b[33m%s\x1b[0m', 'writing file back to source')
23-
writeFileSync(`${__dirname}/../src/Config.ts`, config);
24-
console.log('\x1b[32m%s\x1b[0m', 'Date updated');
22+
console.log('\x1b[33m%s\x1b[0m', 'writing file back to source')
23+
writeFileSync(`${__dirname}/../src/Config.ts`, config)
24+
console.log('\x1b[32m%s\x1b[0m', 'Date updated')
2525
} catch (e) {
26-
console.error(e);
27-
process.exit(1);
26+
console.error(e)
27+
process.exit(1)
2828
}
2929

3030
try {
31-
console.log('Update like prod, maaaan')
32-
const config = readFileSync(`${__dirname}/../src/Config.ts`, 'utf-8')
33-
.replace('const prod: boolean = false', 'const prod: boolean = true')
31+
console.log('Update like prod, maaaan')
32+
const config = readFileSync(`${__dirname}/../src/Config.ts`, 'utf-8')
33+
.replace('const prod: boolean = false', 'const prod: boolean = true')
3434

35-
writeFileSync(`${__dirname}/../src/Config.ts`, config)
35+
writeFileSync(`${__dirname}/../src/Config.ts`, config)
3636
} catch (e) {
37-
console.log('maaaaaan that sucks!', e)
38-
process.exit(1)
39-
}
37+
console.log('maaaaaan that sucks!', e)
38+
process.exit(1)
39+
}

0 commit comments

Comments
 (0)