Skip to content

Commit 3fbba35

Browse files
committed
setup eslint and prettier
1 parent b1ee6ad commit 3fbba35

20 files changed

+1349
-1363
lines changed

.eslintrc.json

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"env": {
3+
"browser": true,
4+
"es2021": true
5+
},
6+
"extends": [
7+
"plugin:react/recommended"
8+
],
9+
"parserOptions": {
10+
"ecmaFeatures": {
11+
"jsx": true
12+
},
13+
"ecmaVersion": 13,
14+
"sourceType": "module"
15+
},
16+
"plugins": [
17+
"react"
18+
],
19+
"rules": {
20+
"react/react-in-jsx-scope": "off"
21+
},
22+
23+
"settings": {
24+
"react": {
25+
"version": "detect"
26+
}
27+
}
28+
}

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
node_modules
1+
node_modules
2+
/storybook-static

.husky/pre-commit

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/bin/sh
22
. "$(dirname "$0")/_/husky.sh"
33

4-
npm test
4+
npm run prettier
5+
npm run lint

.prettierignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
stories
2+
storybook-static
3+
dist

.storybook/main.js

+3-9
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
11
module.exports = {
2-
"stories": [
3-
"../src/**/*.stories.mdx",
4-
"../src/**/*.stories.@(js|jsx|ts|tsx)"
5-
],
6-
"addons": [
7-
"@storybook/addon-links",
8-
"@storybook/addon-essentials"
9-
]
10-
}
2+
stories: ["../src/**/*.stories.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"],
3+
addons: ["@storybook/addon-links", "@storybook/addon-essentials"],
4+
};

.storybook/preview.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ export const parameters = {
66
date: /Date$/,
77
},
88
},
9-
}
9+
};

.stylelintrc.json

-9
This file was deleted.

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
## Commands
44

55
- `npm run storybook` to see components and changes in real time
6-
- `npm run build-editor` to build dist folder
6+
- `npm run build-editor` to build dist folder

dist/index.es.css

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.es.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)