Skip to content

Commit

Permalink
Adds eslint & plugins for typescript and vue. Adds cicd lint workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
jim-toth committed Aug 24, 2023
1 parent 797580f commit f97bcec
Show file tree
Hide file tree
Showing 4 changed files with 1,190 additions and 17 deletions.
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

0 comments on commit f97bcec

Please sign in to comment.