Skip to content

ESLint #26

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

Merged
merged 6 commits into from
Jan 11, 2025
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
3 changes: 2 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
"Vue.volar",
"bradlc.vscode-tailwindcss",
"shd101wyy.markdown-preview-enhanced",
"formulahendry.auto-rename-tag"
"formulahendry.auto-rename-tag",
"pmneo.tsimporter"
],
"settings": {
"terminal.integrated.shell.linux": "/bin/sh"
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/eslint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: ESLint

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:
eslint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '20'
cache: 'npm'

- name: Install Dependencies
run: npm ci

- name: Run ESLint
run: npm run lint
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ dist
dist-ssr
*.local
!Dockerfile.local
components.d.ts

# Editor directories and files
.vscode/*
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,9 @@ An alternative to using the [Laravel, Inertia.js, & PrimeVue Starter Kit](https:
->name('password.update');
```

## TypeScript
TypeScript is configured and ready for use if desired, but is not required.

## Theme
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.

Expand Down
54 changes: 54 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
// https://eslint.org/docs/latest/use/configure/
// https://eslint.vuejs.org/user-guide/
// https://typescript-eslint.io/rules/?=recommended

import eslint from '@eslint/js';
import eslintConfigPrettier from 'eslint-config-prettier';
import eslintPluginVue from 'eslint-plugin-vue';
import globals from 'globals';
import typescriptEslint from 'typescript-eslint';

export default typescriptEslint.config(
{ ignores: ['*.d.ts', '**/coverage', '**/dist'] },
{
files: ['**/*.js'],
...eslint.configs.recommended,
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
globals: {
...globals.browser,
process: 'readonly',
module: 'readonly',
require: 'readonly',
window: 'readonly',
},
},
},
{
files: ['**/*.{ts,vue}'],
extends: [
eslint.configs.recommended,
...typescriptEslint.configs.recommended,
...eslintPluginVue.configs['flat/recommended'],
],
languageOptions: {
ecmaVersion: 'latest',
globals: {
...globals.browser,
},
sourceType: 'module',
parserOptions: {
parser: typescriptEslint.parser,
},
},
rules: {
'vue/require-default-prop': 'off',
'vue/attribute-hyphenation': 'off',
'vue/multi-word-component-names': 'off',
'vue/block-lang': 'off',
'@typescript-eslint/no-explicit-any': 'off',
},
},
eslintConfigPrettier
);
Loading
Loading