Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds eslint & plugins for typescript and vue. Adds cicd lint workflow #4

Merged
merged 1 commit into from
Aug 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
module.exports = {
root: true,
overrides: [{
files: [ './**/*.{ts,vue}' ]
}],
env: {
browser: true
},
parser: 'vue-eslint-parser',
parserOptions: {
parser: "@typescript-eslint/parser",
sourceType: 'module',
project: true,
tsconfigRootDir: __dirname,
extraFileExtensions: [ '.vue' ],
vueFeatures: {
interpolationAsNonHTML: false
}
},
plugins: [ '@typescript-eslint' ],
extends: [
'plugin:vue/vue3-recommended',
'plugin:@typescript-eslint/recommended-type-checked',
],
rules: {
indent: [ 'error', 2 ],
'max-len': [ 'error', {
code: 80,
tabWidth: 2
}],
'vue/multi-word-component-names': 'off',
'vue/component-tags-order': 'off',
'vue/max-attributes-per-line': ['warn', {
singleline: { max: 12 },
multiline: { max: 1 }
}],
'vue/block-order': ['warn', {
order: [ 'template', 'style', 'script' ]
}]
}
}
11 changes: 11 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Lint
on: push
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Dependencies
run: npm i
- name: Run ESLint
run: npm run lint
Loading
Loading