Skip to content

Commit

Permalink
feat: add eslint and prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
flingyp committed Jul 11, 2022
1 parent 10eaead commit 0b51cf9
Show file tree
Hide file tree
Showing 8 changed files with 563 additions and 4 deletions.
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# EditorConfig is awesome: https://EditorConfig.org

root = true


[*]
end_of_line = lf
charset = utf-8
indent_style = tab
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true
14 changes: 14 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
*.sh
node_modules
*.md
*.woff
*.ttf
.vscode
.idea
dist
/public
/docs
.husky
.local
/bin
Dockerfile
14 changes: 14 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module.exports = {
env: {
browser: true,
es2021: true
},
extends: ['airbnb-base', 'plugin:prettier/recommended'],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module'
},
plugins: ['@typescript-eslint'],
rules: {}
}
9 changes: 9 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/dist/*
.local
.output.js
/node_modules/**

**/*.svg
**/*.sh

/public/*
11 changes: 11 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"printWidth": 120,
"useTabs": false,
"tabWidth": 2,
"semi": false,
"singleQuote": true,
"trailingComma": "none",
"arrowParens": "avoid",
"bracketSpacing": true,
"vueIndentScriptAndStyle": true
}
11 changes: 10 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"module": "./dist/index.esm.js",
"types": "./dist/index.d.ts",
"scripts": {
"release": "standard-version"
"release": "standard-version",
"first-release": "pnpm run release -- --first-release"
},
"files": [
"dist"
Expand All @@ -27,6 +28,14 @@
"license": "MIT",
"devDependencies": {
"@types/node": "^18.0.3",
"@typescript-eslint/eslint-plugin": "^5.30.5",
"@typescript-eslint/parser": "^5.30.5",
"eslint": "^7.32.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-prettier": "^4.2.1",
"prettier": "^2.7.1",
"standard-version": "^9.5.0",
"typescript": "^4.7.4"
}
Expand Down
Loading

0 comments on commit 0b51cf9

Please sign in to comment.