Skip to content

Commit 5852d89

Browse files
committed
created yaml for lint testing
1 parent ee4f390 commit 5852d89

File tree

6 files changed

+3555
-61
lines changed

6 files changed

+3555
-61
lines changed

.github/workflows/main.yaml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"name": "Lint workflow",
3+
"on": {
4+
"pull_request": {
5+
"branches": ["develop", "staging"]
6+
}
7+
},
8+
"jobs": {
9+
"test": {
10+
"runs-on": "ubuntu-latest",
11+
"steps": [
12+
{
13+
"name": "Checkout code",
14+
"uses": "actions/checkout@v1"
15+
},
16+
{
17+
"name": "Use Node.js 21.x",
18+
"uses": "actions/setup-node@v1",
19+
"with": {
20+
"node-version": "21.x"
21+
}
22+
},
23+
{
24+
"name": "🧰 install deps",
25+
"run": "npm install"
26+
},
27+
{
28+
"name": "Run lint",
29+
"run": "npm run lint"
30+
}
31+
]
32+
}
33+
}
34+
}

eslint.config.mjs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
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+
8+
export default defineConfig([
9+
{ files: ["**/*.{js,mjs,cjs,ts,jsx,tsx}"], plugins: { js }, extends: ["js/recommended"] },
10+
{ files: ["**/*.{js,mjs,cjs,ts,jsx,tsx}"], languageOptions: { globals: globals.browser } },
11+
tseslint.configs.recommended,
12+
pluginReact.configs.flat.recommended,
13+
]);

0 commit comments

Comments
 (0)