Skip to content

Commit e5da739

Browse files
committed
Upgrade CI
1 parent 612e991 commit e5da739

9 files changed

+1802
-557
lines changed

.editorconfig

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ trim_trailing_whitespace = true
99
[*.html]
1010
indent_style = tab
1111

12-
[*.js]
12+
[*.{js,mjs}]
1313
indent_style = tab
1414

1515
[*.json]

.eslintrc.json

-32
This file was deleted.

.github/workflows/nodejs.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313

1414
strategy:
1515
matrix:
16-
node-version: [16.x, 20.x]
16+
node-version: [18.x, 22.x]
1717

1818
steps:
1919
- uses: actions/checkout@v3

.markdownlint.json

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"no-multiple-blanks": {
1313
"maximum": 2
1414
},
15+
"no-trailing-spaces": true,
1516
"ul-indent": false,
1617
"ul-style": {
1718
"style": "consistent"

.markdownlintignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.git/
2+
node_modules/

eslint.config.mjs

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
import globals from "globals";
2+
import html from "eslint-plugin-html";
3+
import js from "@eslint/js";
4+
import neostandard, { resolveIgnoresFromGitignore } from 'neostandard';
5+
import stylistic from '@stylistic/eslint-plugin';
6+
7+
export default [
8+
{
9+
files: ["**/*.js"],
10+
languageOptions: {
11+
globals: {
12+
...globals.browser,
13+
},
14+
sourceType: "script",
15+
},
16+
},
17+
{
18+
files: ["**/*.html"],
19+
plugins: { html },
20+
settings: {
21+
"html/indent": "tab",
22+
"html/report-bad-indent": "error",
23+
},
24+
},
25+
{
26+
ignores: [
27+
...resolveIgnoresFromGitignore(),
28+
],
29+
},
30+
js.configs.recommended,
31+
// stylistic.configs['recommended-flat'],
32+
...neostandard(),
33+
{
34+
plugins: {
35+
"@stylistic": stylistic,
36+
},
37+
rules: {
38+
"camelcase": "off",
39+
"eqeqeq": "off",
40+
"no-empty": ["error", { "allowEmptyCatch": true }],
41+
"no-unused-vars": ["error", {
42+
"args": "none",
43+
"caughtErrors": "none",
44+
}],
45+
"object-shorthand": ["warn", "consistent"],
46+
"yoda": "off",
47+
"@stylistic/indent": ["warn", "tab", { "SwitchCase": 1 }],
48+
"@stylistic/linebreak-style": ["error", "unix"],
49+
"@stylistic/max-len": ["warn", 165],
50+
"@stylistic/no-tabs": "off",
51+
"@stylistic/quotes": ["off", "single", { "avoidEscape": true }],
52+
"@stylistic/quote-props": ["warn", "consistent"],
53+
"@stylistic/semi": ["warn", "always"],
54+
"@stylistic/space-before-function-paren": ["warn", {
55+
"anonymous": "always",
56+
"asyncArrow": "always",
57+
"named": "never",
58+
}],
59+
},
60+
},
61+
];

0 commit comments

Comments
 (0)