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 d33f366 commit 18087e7
Show file tree
Hide file tree
Showing 8 changed files with 2,254 additions and 793 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
32 changes: 0 additions & 32 deletions .eslintrc.json

This file was deleted.

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
1 change: 1 addition & 0 deletions .eslintignore → .markdownlintignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.git/
node_modules/
61 changes: 61 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
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(),
],
},
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 18087e7

Please sign in to comment.