Skip to content

Commit 3a40421

Browse files
committed
10: ESLint config added
1 parent e42b6ad commit 3a40421

File tree

6 files changed

+3040
-117
lines changed

6 files changed

+3040
-117
lines changed

.github/workflows/node.js.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ permissions:
55
pages: write
66
id-token: write
77
pull-requests: write
8+
statuses: write
9+
packages: read
810

911
on:
1012
push:
@@ -23,6 +25,11 @@ jobs:
2325

2426
steps:
2527
- uses: actions/checkout@v4
28+
with:
29+
# super-linter needs the full git history to get the
30+
# list of files that changed across commits
31+
fetch-depth: 0
32+
persist-credentials: false
2633
- name: Use Node.js ${{ matrix.node-version }}
2734
uses: actions/setup-node@v4
2835
with:
@@ -39,6 +46,13 @@ jobs:
3946
with:
4047
path: demo/
4148

49+
- name: Super-linter
50+
uses: super-linter/super-linter/slim@v8.1.0
51+
env:
52+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
53+
FILTER_REGEX_INCLUDE: ^src/
54+
VALIDATE_GIT_COMMITLINT: false
55+
4256
test:
4357
needs: build
4458

eslint.config.mjs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import js from "@eslint/js";
2+
import globals from "globals";
3+
import tseslint from "typescript-eslint";
4+
import pluginReact from "eslint-plugin-react";
5+
import { defineConfig } from "eslint/config";
6+
7+
export default defineConfig([
8+
{ files: ["**/*.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"], plugins: { js }, extends: ["js/recommended"], languageOptions: { globals: globals.browser } },
9+
tseslint.configs.recommended,
10+
pluginReact.configs.flat.recommended,
11+
]);

0 commit comments

Comments
 (0)