Skip to content

Commit

Permalink
chore: add eslint config
Browse files Browse the repository at this point in the history
  • Loading branch information
LZHD committed Jul 5, 2021
1 parent 0adc256 commit e1200f2
Show file tree
Hide file tree
Showing 10 changed files with 1,969 additions and 3,254 deletions.
14 changes: 14 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# http://editorconfig.org
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
insert_final_newline = false
trim_trailing_whitespace = false
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
public
dist
*.d.ts
16 changes: 16 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module.exports = {
root: true,
env: {
node: true
},
extends: [
'plugin:vue/vue3-essential',
'eslint:recommended',
'@vue/typescript/recommended',
'@vue/prettier',
'@vue/prettier/@typescript-eslint'
],
parserOptions: {
ecmaVersion: 2020
}
};
17 changes: 16 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
node_modules
dist
.DS_Store
dist
dist-ssr
*.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
tests/**/coverage/

# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
7 changes: 7 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
bracketSpacing: true,
jsxBracketSameLine: true,
singleQuote: true,
arrowParens: 'avoid',
trailingComma: 'all'
};
4 changes: 2 additions & 2 deletions build/utils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import dotenv from 'dotenv';
import * as dotenv from 'dotenv';

export interface ViteEnv {
VITE_PORT: number;
Expand Down Expand Up @@ -35,4 +35,4 @@ export function loadEnv(): ViteEnv {
process.env[envName] = realName;
}
return ret;
}
}
6 changes: 3 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<style>
* {
margin: 0;
pad: 0;
padding: 0;
box-sizing: border-box;
}

Expand Down Expand Up @@ -72,7 +72,7 @@
50.1%,
100% {
background: #0f0;
box-sizing: 0 0 5px #0f0,
box-shadow: 0 0 5px #0f0,
0 0 15px #0f0,
0 0 30px #0f0,
0 0 60px #0f0,
Expand Down Expand Up @@ -136,4 +136,4 @@ <h3>loading</h3>
<script type="module" src="/src/main.ts"></script>
</body>

</html>
</html>
Loading

0 comments on commit e1200f2

Please sign in to comment.