Skip to content

Commit df8c1c1

Browse files
committed
Add ESLint + editorconfig
1 parent 3e1fdc5 commit df8c1c1

File tree

6 files changed

+373
-17
lines changed

6 files changed

+373
-17
lines changed

.editorconfig

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
# Unix-style newlines with a newline ending every file
4+
[*]
5+
end_of_line = lf
6+
insert_final_newline = true
7+
charset = utf-8
8+
indent_style = space
9+
indent_size = 2

.eslintignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// Inside your .eslintignore file
2+
!.storybook
3+
storybook-static

.eslintrc.js

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
module.exports = {
2+
env: {
3+
browser: true,
4+
es2021: true,
5+
node: true,
6+
},
7+
extends: ["eslint:recommended", "prettier", "plugin:storybook/recommended"],
8+
parserOptions: {
9+
ecmaVersion: "latest",
10+
sourceType: "module",
11+
},
12+
};

.prettierignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
# Ignore artifacts:
22
build
3-
coverage
3+
coverage
4+
storybook-static
5+
node_modules

package.json

+3
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@
3030
"@storybook/testing-library": "^0.0.13",
3131
"babel-loader": "^8.2.5",
3232
"chokidar-cli": "^3.0.0",
33+
"eslint": "^8.32.0",
34+
"eslint-config-prettier": "^8.6.0",
35+
"eslint-plugin-storybook": "^0.6.10",
3336
"fs-extra": "^10.1.0",
3437
"husky": "^8.0.3",
3538
"lint-staged": "^13.1.0",

0 commit comments

Comments
 (0)