Skip to content

Commit

Permalink
Merge pull request #2 from svelte-plugins/linting
Browse files Browse the repository at this point in the history
🏗 build(tooling): fix linting, formatting and precommit hooks
  • Loading branch information
dysfunc authored Nov 25, 2023
2 parents 919fe2a + cfaf6d1 commit ab8e6cd
Show file tree
Hide file tree
Showing 13 changed files with 2,870 additions and 3,664 deletions.
5 changes: 5 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
config
node_modules
scripts
src/**/*.snap.js
.eslintrc.js
28 changes: 28 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"env": {
"es2017": true,
"commonjs": true,
"node": true
},
"parserOptions": {
"ecmaVersion": 2020,
"sourceType": "module"
},
"plugins": ["vitest"],
"extends": ["eslint:recommended", "plugin:vitest/recommended"],
"ignorePatterns": ["**/*.snap.js"],
"overrides": [
{
"files": ["*.svelte"],
"parser": "svelte-eslint-parser"
}
],
"rules": {
"eqeqeq": "error",
"no-useless-escape": "off",
"no-unused-expressions": "off",
"no-unused-vars": "off",
"no-self-assign": "off",
"no-undef": "off"
}
}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

# except
!.editorconfig
!.eslintignore
!.eslintrc.json
!.github
!.gitignore
Expand Down
5 changes: 4 additions & 1 deletion .lintstagedrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{
"./src/**/*.{test.js,js,svelte}": ["eslint -c ./.eslintrc.js --fix", "prettier --write"]
"./src/**/*.{test.js,js,json,svelte}": [
"eslint -c ./.eslintrc.json --fix",
"prettier --write"
]
}
11 changes: 9 additions & 2 deletions .prettierrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,12 @@
"svelteSortOrder": "options-scripts-markup-styles",
"svelteStrictMode": false,
"svelteBracketNewLine": true,
"svelteAllowShorthand": true
}
"svelteAllowShorthand": true,
"plugins": ["prettier-plugin-svelte"],
"overrides": [{
"files": "*.svelte",
"options": {
"parser": "svelte"
}
}]
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ DatePicker CSS variables:

```css
/**
* Common
* Common Variables
*/
--datepicker-border-color: #e8e9ea;

Expand Down
2 changes: 1 addition & 1 deletion docs/public/global.css

Large diffs are not rendered by default.

9 changes: 1 addition & 8 deletions docs/src/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -403,14 +403,7 @@
@media only screen and (max-width: 800px) {
.sample {
height: 600px;
margin: 48px auto;
}
}
@media only screen and (max-width: 600px) {
.sample {
height: 400px;
height: 660px;
margin: 48px auto;
}
}
Expand Down
Loading

0 comments on commit ab8e6cd

Please sign in to comment.