-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add es lint and fix all linting issues
- Loading branch information
1 parent
06e08b8
commit 446214a
Showing
29 changed files
with
1,945 additions
and
188 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Build Vue | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
eslint: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
php: [8.4] | ||
|
||
steps: | ||
- name: Use Node.js 22 | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 22 | ||
cache: 'npm' | ||
- run: npm install | ||
|
||
- run: npm run build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Run JS Linter | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
eslint: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
php: [8.4] | ||
|
||
steps: | ||
- name: Use Node.js 22 | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 22 | ||
cache: 'npm' | ||
- run: npm install | ||
|
||
- run: npm run lint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import eslint from '@eslint/js'; | ||
import eslintPluginVue from 'eslint-plugin-vue'; | ||
import globals from 'globals'; | ||
import typescriptEslint from 'typescript-eslint'; | ||
import {includeIgnoreFile} from "@eslint/compat"; | ||
import path from "node:path"; | ||
import {fileURLToPath} from "node:url"; | ||
|
||
const __filename = fileURLToPath(import.meta.url); | ||
const __dirname = path.dirname(__filename); | ||
const gitignorePath = path.resolve(__dirname, ".gitignore"); | ||
|
||
/** @type {import('eslint').Linter.Config[]} */ | ||
export default [ | ||
includeIgnoreFile(gitignorePath), | ||
{ | ||
files: [".resources/js/**/*.{js,mjs,cjs,ts,vue}"], | ||
}, | ||
{ | ||
files: [".resources/js/**/*.js"], languageOptions: {sourceType: "script"}, | ||
}, | ||
eslint.configs.recommended, | ||
...typescriptEslint.configs.recommended, | ||
...eslintPluginVue.configs['flat/recommended'], | ||
{ | ||
files: ['**/*.{ts,vue}'], | ||
languageOptions: { | ||
ecmaVersion: 'latest', | ||
sourceType: 'module', | ||
globals: { | ||
...globals.browser, | ||
...globals.commonjs, | ||
...{ | ||
"App": 'readonly', | ||
"route": 'readonly', | ||
} | ||
}, | ||
parserOptions: { | ||
parser: typescriptEslint.parser, | ||
}, | ||
}, | ||
rules: { | ||
"vue/html-indent": ["error", 4], | ||
"vue/multi-word-component-names": ["off"] | ||
} | ||
} | ||
]; |
Oops, something went wrong.