Skip to content
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

chore(vite-examples): update eslint to v9 and typescript-eslint to v8 #6454

Merged
merged 2 commits into from
Oct 7, 2024
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
9 changes: 9 additions & 0 deletions .github/workflows/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
path:
- nextjs-app
- nextjs-pages
- remix-ts
- vite-ts
fail-fast: false
steps:
Expand All @@ -41,6 +42,10 @@ jobs:
run: npm run test --if-present
working-directory: examples/${{ matrix.path }}

- name: ESLint
run: npm run lint --if-present
working-directory: examples/${{ matrix.path }}

templates:
runs-on: ubuntu-latest
strategy:
Expand Down Expand Up @@ -68,3 +73,7 @@ jobs:
- name: Test
run: npm run test --if-present
working-directory: templates/${{ matrix.path }}

- name: ESLint
run: npm run lint --if-present
working-directory: templates/${{ matrix.path }}
11 changes: 0 additions & 11 deletions examples/vite-ts/.eslintrc.cjs

This file was deleted.

2 changes: 1 addition & 1 deletion examples/vite-ts/cypress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default defineConfig({

e2e: {
baseUrl: 'http://localhost:5173/',
setupNodeEvents(on, config) {
setupNodeEvents() {
// implement node event listeners here
}
}
Expand Down
1 change: 1 addition & 0 deletions examples/vite-ts/cypress/support/component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import './commands';
// Alternatively, can be defined in cypress/support/component.d.ts
// with a <reference path="./component" /> at the top of your spec.
declare global {
// eslint-disable-next-line @typescript-eslint/no-namespace
namespace Cypress {
interface Chainable {
mount: typeof mount;
Expand Down
25 changes: 25 additions & 0 deletions examples/vite-ts/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import js from '@eslint/js';
import globals from 'globals';
import reactHooks from 'eslint-plugin-react-hooks';
import reactRefresh from 'eslint-plugin-react-refresh';
import tseslint from 'typescript-eslint';

export default tseslint.config(
{ ignores: ['dist'] },
{
extends: [js.configs.recommended, ...tseslint.configs.recommended],
files: ['**/*.{ts,tsx}'],
languageOptions: {
ecmaVersion: 2020,
globals: globals.browser
},
plugins: {
'react-hooks': reactHooks,
'react-refresh': reactRefresh
},
rules: {
...reactHooks.configs.recommended.rules,
'react-refresh/only-export-components': ['warn', { allowConstantExport: true }]
}
}
);
Loading
Loading