Skip to content

Commit

Permalink
Upgrade CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Alkarex committed Aug 2, 2024
1 parent 89d1ab1 commit 1f57293
Show file tree
Hide file tree
Showing 7 changed files with 2,289 additions and 777 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ trim_trailing_whitespace = true
[*.html]
indent_style = tab

[*.js]
[*.{js,mjs}]
indent_style = tab

[*.json]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:

strategy:
matrix:
node-version: [16.x, 20.x]
node-version: [18.x, 22.x]

steps:
- uses: actions/checkout@v4
Expand Down
1 change: 1 addition & 0 deletions .markdownlint.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"no-multiple-blanks": {
"maximum": 2
},
"no-trailing-spaces": true,
"ul-indent": false,
"ul-style": {
"style": "consistent"
Expand Down
2 changes: 1 addition & 1 deletion .eslintignore → .markdownlintignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
examples/
.git/
node_modules/
62 changes: 62 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
import globals from "globals";
import html from "eslint-plugin-html";
import js from "@eslint/js";
import neostandard, { resolveIgnoresFromGitignore } from 'neostandard';
import stylistic from '@stylistic/eslint-plugin';

export default [
{
files: ["**/*.js"],
languageOptions: {
globals: {
...globals.browser,
},
sourceType: "script",
},
},
{
files: ["**/*.html"],
plugins: { html },
settings: {
"html/indent": "tab",
"html/report-bad-indent": "error",
},
},
{
ignores: [
...resolveIgnoresFromGitignore(),
"examples/",
],
},
js.configs.recommended,
// stylistic.configs['recommended-flat'],
...neostandard(),
{
plugins: {
"@stylistic": stylistic,
},
rules: {
"camelcase": "off",
"eqeqeq": "off",
"no-empty": ["error", { "allowEmptyCatch": true }],
"no-unused-vars": ["error", {
"args": "none",
"caughtErrors": "none",
}],
"object-shorthand": ["warn", "consistent"],
"yoda": "off",
"@stylistic/indent": ["warn", "tab", { "SwitchCase": 1 }],
"@stylistic/linebreak-style": ["error", "unix"],
"@stylistic/max-len": ["warn", 165],
"@stylistic/no-tabs": "off",
"@stylistic/quotes": ["off", "single", { "avoidEscape": true }],
"@stylistic/quote-props": ["warn", "consistent"],
"@stylistic/semi": ["warn", "always"],
"@stylistic/space-before-function-paren": ["warn", {
"anonymous": "always",
"asyncArrow": "always",
"named": "never",
}],
},
},
];
Loading

0 comments on commit 1f57293

Please sign in to comment.