Skip to content

Commit ab8e6cd

Browse files
authored
Merge pull request #2 from svelte-plugins/linting
🏗 build(tooling): fix linting, formatting and precommit hooks
2 parents 919fe2a + cfaf6d1 commit ab8e6cd

File tree

13 files changed

+2870
-3664
lines changed

13 files changed

+2870
-3664
lines changed

.eslintignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
config
2+
node_modules
3+
scripts
4+
src/**/*.snap.js
5+
.eslintrc.js

.eslintrc.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"env": {
3+
"es2017": true,
4+
"commonjs": true,
5+
"node": true
6+
},
7+
"parserOptions": {
8+
"ecmaVersion": 2020,
9+
"sourceType": "module"
10+
},
11+
"plugins": ["vitest"],
12+
"extends": ["eslint:recommended", "plugin:vitest/recommended"],
13+
"ignorePatterns": ["**/*.snap.js"],
14+
"overrides": [
15+
{
16+
"files": ["*.svelte"],
17+
"parser": "svelte-eslint-parser"
18+
}
19+
],
20+
"rules": {
21+
"eqeqeq": "error",
22+
"no-useless-escape": "off",
23+
"no-unused-expressions": "off",
24+
"no-unused-vars": "off",
25+
"no-self-assign": "off",
26+
"no-undef": "off"
27+
}
28+
}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
# except
44
!.editorconfig
5+
!.eslintignore
56
!.eslintrc.json
67
!.github
78
!.gitignore

.lintstagedrc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
{
2-
"./src/**/*.{test.js,js,svelte}": ["eslint -c ./.eslintrc.js --fix", "prettier --write"]
2+
"./src/**/*.{test.js,js,json,svelte}": [
3+
"eslint -c ./.eslintrc.json --fix",
4+
"prettier --write"
5+
]
36
}

.prettierrc.json

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,12 @@
99
"svelteSortOrder": "options-scripts-markup-styles",
1010
"svelteStrictMode": false,
1111
"svelteBracketNewLine": true,
12-
"svelteAllowShorthand": true
13-
}
12+
"svelteAllowShorthand": true,
13+
"plugins": ["prettier-plugin-svelte"],
14+
"overrides": [{
15+
"files": "*.svelte",
16+
"options": {
17+
"parser": "svelte"
18+
}
19+
}]
20+
}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ DatePicker CSS variables:
8383

8484
```css
8585
/**
86-
* Common
86+
* Common Variables
8787
*/
8888
--datepicker-border-color: #e8e9ea;
8989

docs/public/global.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/src/App.svelte

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -403,14 +403,7 @@
403403
404404
@media only screen and (max-width: 800px) {
405405
.sample {
406-
height: 600px;
407-
margin: 48px auto;
408-
}
409-
}
410-
411-
@media only screen and (max-width: 600px) {
412-
.sample {
413-
height: 400px;
406+
height: 660px;
414407
margin: 48px auto;
415408
}
416409
}

0 commit comments

Comments
 (0)