Skip to content

Commit 3e2e334

Browse files
committed
Add eslint/prettier
1 parent 7d6efad commit 3e2e334

File tree

5 files changed

+2276
-0
lines changed

5 files changed

+2276
-0
lines changed

.prettierrc

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"trailingComma": "es5",
3+
"semi": false,
4+
"tabWidth": 2
5+
}

eslint.config.mjs

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
import js from "@eslint/js"
2+
import tsParser from "@typescript-eslint/parser"
3+
import tsPlugin from "@typescript-eslint/eslint-plugin"
4+
import reactPlugin from "eslint-plugin-react"
5+
import prettierPlugin from "eslint-plugin-prettier"
6+
import prettierConfig from "eslint-config-prettier"
7+
import globals from "globals"
8+
9+
export default [
10+
js.configs.recommended,
11+
{
12+
languageOptions: {
13+
ecmaVersion: 2022,
14+
sourceType: "module",
15+
parser: tsParser,
16+
parserOptions: {
17+
ecmaFeatures: {
18+
jsx: true,
19+
},
20+
},
21+
globals: {
22+
...globals.browser,
23+
...globals.es2021,
24+
...globals.node,
25+
},
26+
},
27+
settings: {
28+
react: {
29+
version: "detect",
30+
},
31+
},
32+
plugins: {
33+
"@typescript-eslint": tsPlugin,
34+
react: reactPlugin,
35+
prettier: prettierPlugin,
36+
},
37+
rules: {
38+
quotes: ["error", "backtick"],
39+
"prettier/prettier": "error",
40+
...tsPlugin.configs.recommended.rules,
41+
...reactPlugin.configs.recommended.rules,
42+
...prettierConfig.rules,
43+
},
44+
},
45+
]

index.js

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
import js from "@eslint/js"

package.json

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"name": "@kylemathews/sync",
3+
"version": "0.0.0",
4+
"description": "",
5+
"main": "index.js",
6+
"scripts": {
7+
"test": "echo \"Error: no test specified\" && exit 1"
8+
},
9+
"keywords": [],
10+
"author": "Kyle Mathews <[email protected]>",
11+
"license": "MIT",
12+
"devDependencies": {
13+
"@eslint/js": "^9.20.0",
14+
"@typescript-eslint/eslint-plugin": "^8.24.1",
15+
"@typescript-eslint/parser": "^8.24.1",
16+
"eslint": "^9.0.0",
17+
"eslint-config-prettier": "^10.0.1",
18+
"eslint-plugin-prettier": "^5.2.3",
19+
"eslint-plugin-react": "^7.37.4",
20+
"prettier": "^3.5.1"
21+
}
22+
}

0 commit comments

Comments
 (0)