Skip to content

Commit

Permalink
Merge pull request #4 from art-by-city/3-eslint
Browse files Browse the repository at this point in the history
Adds eslint & plugins for typescript and vue. Adds cicd lint workflow
  • Loading branch information
jim-toth authored Aug 24, 2023
2 parents 797580f + f97bcec commit 5f323c6
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 5f323c6

Please sign in to comment.