Skip to content

Commit e1200f2

Browse files
committed
chore: add eslint config
1 parent 0adc256 commit e1200f2

File tree

10 files changed

+1969
-3254
lines changed

10 files changed

+1969
-3254
lines changed

.editorconfig

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# http://editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
indent_style = space
7+
indent_size = 2
8+
end_of_line = lf
9+
insert_final_newline = true
10+
trim_trailing_whitespace = true
11+
12+
[*.md]
13+
insert_final_newline = false
14+
trim_trailing_whitespace = false

.eslintignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
public
2+
dist
3+
*.d.ts

.eslintrc.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
module.exports = {
2+
root: true,
3+
env: {
4+
node: true
5+
},
6+
extends: [
7+
'plugin:vue/vue3-essential',
8+
'eslint:recommended',
9+
'@vue/typescript/recommended',
10+
'@vue/prettier',
11+
'@vue/prettier/@typescript-eslint'
12+
],
13+
parserOptions: {
14+
ecmaVersion: 2020
15+
}
16+
};

.gitignore

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
11
node_modules
2-
dist
32
.DS_Store
3+
dist
4+
dist-ssr
5+
*.local
6+
7+
npm-debug.log*
8+
yarn-debug.log*
9+
yarn-error.log*
10+
tests/**/coverage/
11+
12+
# Editor directories and files
13+
.idea
14+
.vscode
15+
*.suo
16+
*.ntvs*
17+
*.njsproj
18+
*.sln

.prettierrc.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module.exports = {
2+
bracketSpacing: true,
3+
jsxBracketSameLine: true,
4+
singleQuote: true,
5+
arrowParens: 'avoid',
6+
trailingComma: 'all'
7+
};

build/utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import dotenv from 'dotenv';
1+
import * as dotenv from 'dotenv';
22

33
export interface ViteEnv {
44
VITE_PORT: number;
@@ -35,4 +35,4 @@ export function loadEnv(): ViteEnv {
3535
process.env[envName] = realName;
3636
}
3737
return ret;
38-
}
38+
}

index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<style>
2020
* {
2121
margin: 0;
22-
pad: 0;
22+
padding: 0;
2323
box-sizing: border-box;
2424
}
2525

@@ -72,7 +72,7 @@
7272
50.1%,
7373
100% {
7474
background: #0f0;
75-
box-sizing: 0 0 5px #0f0,
75+
box-shadow: 0 0 5px #0f0,
7676
0 0 15px #0f0,
7777
0 0 30px #0f0,
7878
0 0 60px #0f0,
@@ -136,4 +136,4 @@ <h3>loading</h3>
136136
<script type="module" src="/src/main.ts"></script>
137137
</body>
138138

139-
</html>
139+
</html>

0 commit comments

Comments
 (0)