Skip to content

Commit 1326b2c

Browse files
committed
buid: set up eslint config
1 parent afe29eb commit 1326b2c

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

eslint.config.js

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
'use strict';
2+
3+
import { defineConfig } from 'eslint/config';
4+
import eslintJs from '@eslint/js';
5+
import globals from 'globals';
6+
import react from 'eslint-plugin-react';
7+
8+
export default defineConfig([
9+
// React configuration for client
10+
{
11+
files: ['client/**/*.{js,jsx,mjs,cjs,ts,tsx}'],
12+
plugins: {
13+
react
14+
},
15+
languageOptions: {
16+
parserOptions: {
17+
ecmaFeatures: {
18+
jsx: true
19+
}
20+
},
21+
globals: {
22+
...globals.browser
23+
}
24+
}
25+
},
26+
// Node.js configuration for server
27+
{
28+
files: ['server/**/*.js'],
29+
extends: [eslintJs.configs.recommended],
30+
languageOptions: {
31+
globals: {
32+
...globals.node
33+
}
34+
}
35+
}
36+
]);

0 commit comments

Comments
 (0)