Skip to content

Commit 7f14a2b

Browse files
massongitrenovate[bot]github-actions[bot]
authored
super-linterアップデート (#1798)
* Update super-linter/super-linter action to v8 * gitleaksをアップデートしてあげたよ! (#1797) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Delete .eslintrc.yml * Create eslint.config.mjs * ignore dist * ignore修正 * comment out react settings * comment out react settings --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 0c35010 commit 7f14a2b

File tree

4 files changed

+137
-75
lines changed

4 files changed

+137
-75
lines changed

.eslintrc.yml

Lines changed: 0 additions & 73 deletions
This file was deleted.

.github/workflows/super-linter.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
# Run Linter against code base #
5555
################################
5656
- name: Lint Code Base
57-
uses: super-linter/super-linter/slim@12150456a73e248bdc94d0794898f94e23127c88 # v7.4.0
57+
uses: super-linter/super-linter/slim@5119dcd8011e92182ce8219d9e9efc82f16fddb6 # v8.0.0
5858
env:
5959
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6060
DEFAULT_BRANCH: main

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
repos:
33
- repo: https://github.com/zricethezav/gitleaks
4-
rev: v8.25.1
4+
rev: v8.27.2
55
hooks:
66
- id: gitleaks

eslint.config.mjs

Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
// https://github.com/super-linter/super-linter/blob/0d8f7aad449c1dc8ecaf2362684de5d379d2cd7d/TEMPLATES/eslint.config.mjs
2+
import { defineConfig, globalIgnores } from "eslint/config";
3+
import n from "eslint-plugin-n";
4+
import prettier from "eslint-plugin-prettier";
5+
import globals from "globals";
6+
import jsoncParser from "jsonc-eslint-parser";
7+
import typescriptEslint from "@typescript-eslint/eslint-plugin";
8+
import tsParser from "@typescript-eslint/parser";
9+
import vueParser from "vue-eslint-parser";
10+
import path from "node:path";
11+
import { fileURLToPath } from "node:url";
12+
import js from "@eslint/js";
13+
import { FlatCompat } from "@eslint/eslintrc";
14+
15+
const __filename = fileURLToPath(import.meta.url);
16+
const __dirname = path.dirname(__filename);
17+
const compat = new FlatCompat({
18+
baseDirectory: __dirname,
19+
recommendedConfig: js.configs.recommended,
20+
allConfig: js.configs.all,
21+
});
22+
23+
export default defineConfig([
24+
globalIgnores(["!**/.*", "**/node_modules/.*", "**/dist/*"]),
25+
{
26+
extends: compat.extends("eslint:recommended"),
27+
28+
plugins: {
29+
n,
30+
prettier,
31+
},
32+
33+
languageOptions: {
34+
globals: {
35+
...globals.browser,
36+
...globals.jest,
37+
...globals.node,
38+
},
39+
},
40+
},
41+
{
42+
files: ["**/*.json"],
43+
extends: compat.extends("plugin:jsonc/recommended-with-json"),
44+
45+
languageOptions: {
46+
parser: jsoncParser,
47+
ecmaVersion: "latest",
48+
sourceType: "script",
49+
50+
parserOptions: {
51+
jsonSyntax: "JSON",
52+
},
53+
},
54+
},
55+
{
56+
files: ["**/*.jsonc"],
57+
extends: compat.extends("plugin:jsonc/recommended-with-jsonc"),
58+
59+
languageOptions: {
60+
parser: jsoncParser,
61+
ecmaVersion: "latest",
62+
sourceType: "script",
63+
64+
parserOptions: {
65+
jsonSyntax: "JSONC",
66+
},
67+
},
68+
},
69+
{
70+
files: ["**/*.json5"],
71+
extends: compat.extends("plugin:jsonc/recommended-with-json5"),
72+
73+
languageOptions: {
74+
parser: jsoncParser,
75+
ecmaVersion: "latest",
76+
sourceType: "script",
77+
78+
parserOptions: {
79+
jsonSyntax: "JSON5",
80+
},
81+
},
82+
},
83+
{
84+
files: ["**/*.js", "**/*.mjs", "**/*.cjs", "**/*.jsx"],
85+
// extends: compat.extends("plugin:react/recommended"),
86+
87+
languageOptions: {
88+
ecmaVersion: "latest",
89+
sourceType: "module",
90+
91+
parserOptions: {
92+
ecmaFeatures: {
93+
jsx: true,
94+
modules: true,
95+
},
96+
},
97+
},
98+
},
99+
{
100+
files: ["**/*.ts", "**/*.cts", "**/*.mts", "**/*.tsx"],
101+
102+
extends: compat.extends(
103+
"plugin:@typescript-eslint/recommended",
104+
"plugin:n/recommended",
105+
// "plugin:react/recommended",
106+
"prettier",
107+
),
108+
109+
plugins: {
110+
"@typescript-eslint": typescriptEslint,
111+
},
112+
113+
languageOptions: {
114+
parser: tsParser,
115+
ecmaVersion: "latest",
116+
sourceType: "module",
117+
},
118+
},
119+
{
120+
files: ["**/*.vue"],
121+
extends: compat.extends("plugin:vue/recommended"),
122+
123+
languageOptions: {
124+
parser: vueParser,
125+
ecmaVersion: "latest",
126+
sourceType: "module",
127+
128+
parserOptions: {
129+
ecmaFeatures: {
130+
modules: true,
131+
},
132+
},
133+
},
134+
},
135+
]);

0 commit comments

Comments
 (0)