chore: update eslint action & eslint-prettier config for endOfLine

This commit is contained in:
Ayo Ayco 2024-12-29 00:23:56 +01:00
parent c0c2ded47c
commit a36d622634
5 changed files with 14 additions and 4 deletions

View file

@ -32,8 +32,7 @@ jobs:
- name: Install ESLint
run: |
npm install eslint@8.10.0
npm install @microsoft/eslint-formatter-sarif@3.1.0
npm install eslint@9.17.0
- name: Run ESLint
env:

View file

@ -1,2 +1,2 @@
npm run test:cli run
# npm run test
npx lint-staged

View file

@ -18,4 +18,14 @@ export default [
{
ignores: ['site/*', 'templates/*'],
},
{
rules: {
'prettier/prettier': [
'error',
{
endOfLine: 'auto',
},
],
},
},
]

View file

@ -9,7 +9,7 @@
"template:basic": "pnpm --filter @templates/basic dev",
"create": "node ./packages/create-mcfly",
"cli": "node ./packages/cli",
"test:cli": "cd packages/cli && pnpm run test",
"test": "vitest run",
"lint": "eslint . --config eslint.config.mjs --cache",
"check": "npm run format && npm run lint",
"format": "prettier . --write",

View file

@ -7,6 +7,7 @@ const config = {
tabWidth: 2,
semi: false,
singleQuote: true,
endOfLine: 'auto',
}
export default config