Skip to content

Commit 736261a

Browse files
authored
Merge pull request #26 from connorabbas/develop
ESLint
2 parents 1d0ceca + 4823e2f commit 736261a

27 files changed

+1778
-114
lines changed

.devcontainer/devcontainer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
"Vue.volar",
2222
"bradlc.vscode-tailwindcss",
2323
"shd101wyy.markdown-preview-enhanced",
24-
"formulahendry.auto-rename-tag"
24+
"formulahendry.auto-rename-tag",
25+
"pmneo.tsimporter"
2526
],
2627
"settings": {
2728
"terminal.integrated.shell.linux": "/bin/sh"

.github/workflows/eslint.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: ESLint
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
pull_request:
7+
branches: [ "master" ]
8+
9+
jobs:
10+
eslint:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: Setup Node.js
16+
uses: actions/setup-node@v3
17+
with:
18+
node-version: '20'
19+
cache: 'npm'
20+
21+
- name: Install Dependencies
22+
run: npm ci
23+
24+
- name: Run ESLint
25+
run: npm run lint

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ dist
1212
dist-ssr
1313
*.local
1414
!Dockerfile.local
15+
components.d.ts
1516

1617
# Editor directories and files
1718
.vscode/*

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,9 @@ An alternative to using the [Laravel, Inertia.js, & PrimeVue Starter Kit](https:
141141
->name('password.update');
142142
```
143143
144+
## TypeScript
145+
TypeScript is configured and ready for use if desired, but is not required.
146+
144147
## Theme
145148
This starter kit provides a light/dark mode and custom theme functionality provided by the powerful PrimeVue theming system, using styled mode and custom design token values.
146149

eslint.config.js

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
// https://eslint.org/docs/latest/use/configure/
2+
// https://eslint.vuejs.org/user-guide/
3+
// https://typescript-eslint.io/rules/?=recommended
4+
5+
import eslint from '@eslint/js';
6+
import eslintConfigPrettier from 'eslint-config-prettier';
7+
import eslintPluginVue from 'eslint-plugin-vue';
8+
import globals from 'globals';
9+
import typescriptEslint from 'typescript-eslint';
10+
11+
export default typescriptEslint.config(
12+
{ ignores: ['*.d.ts', '**/coverage', '**/dist'] },
13+
{
14+
files: ['**/*.js'],
15+
...eslint.configs.recommended,
16+
languageOptions: {
17+
ecmaVersion: 'latest',
18+
sourceType: 'module',
19+
globals: {
20+
...globals.browser,
21+
process: 'readonly',
22+
module: 'readonly',
23+
require: 'readonly',
24+
window: 'readonly',
25+
},
26+
},
27+
},
28+
{
29+
files: ['**/*.{ts,vue}'],
30+
extends: [
31+
eslint.configs.recommended,
32+
...typescriptEslint.configs.recommended,
33+
...eslintPluginVue.configs['flat/recommended'],
34+
],
35+
languageOptions: {
36+
ecmaVersion: 'latest',
37+
globals: {
38+
...globals.browser,
39+
},
40+
sourceType: 'module',
41+
parserOptions: {
42+
parser: typescriptEslint.parser,
43+
},
44+
},
45+
rules: {
46+
'vue/require-default-prop': 'off',
47+
'vue/attribute-hyphenation': 'off',
48+
'vue/multi-word-component-names': 'off',
49+
'vue/block-lang': 'off',
50+
'@typescript-eslint/no-explicit-any': 'off',
51+
},
52+
},
53+
eslintConfigPrettier
54+
);

0 commit comments

Comments
 (0)