Skip to content

Commit

Permalink
Merge pull request #43 from Programmer-RD-AI/42-eslint-configuration-…
Browse files Browse the repository at this point in the history
…not-ignoring-all-cypress-related-files

42 eslint configuration not ignoring all cypress related files
  • Loading branch information
Programmer-RD-AI authored Aug 8, 2024
2 parents 2a1a9f2 + ed5d17f commit 9809269
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 13 deletions.
46 changes: 34 additions & 12 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,42 @@ module.exports = {
root: true,
env: { browser: true, es2020: true },
extends: [
'eslint:recommended',
'plugin:react/recommended',
'plugin:react/jsx-runtime',
'plugin:react-hooks/recommended',
"eslint:recommended",
"plugin:react/recommended",
"plugin:react/jsx-runtime",
"plugin:react-hooks/recommended",
],
ignorePatterns: ['dist', '.eslintrc.cjs'],
parserOptions: { ecmaVersion: 'latest', sourceType: 'module' },
settings: { react: { version: '18.2' } },
plugins: ['react-refresh'],
ignorePatterns: [
"dist",
".eslintrc.cjs",
"cypress/*",
"cypress.config.js",
"cypress.config.ts",
"**/*.cy.js",
"**/*.cy.jsx",
"**/*.cy.ts",
"**/*.cy.tsx",
"**/*.spec.js",
"**/*.spec.jsx",
"**/*.spec.ts",
"**/*.spec.tsx",
"**/*.test.js",
"**/*.test.jsx",
"**/*.test.ts",
"**/*.test.tsx",
"**/*.stories.js",
"**/*.stories.jsx",
"**/*.stories.ts",
"**/*.stories.tsx",
],
parserOptions: { ecmaVersion: "latest", sourceType: "module" },
settings: { react: { version: "18.2" } },
plugins: ["react-refresh"],
rules: {
'react/jsx-no-target-blank': 'off',
'react-refresh/only-export-components': [
'warn',
"react/jsx-no-target-blank": "off",
"react-refresh/only-export-components": [
"warn",
{ allowConstantExport: true },
],
},
}
};
2 changes: 1 addition & 1 deletion .github/workflows/cypress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '16' # Use the appropriate Node.js version for your project
node-version: '20' # Use the appropriate Node.js version for your project

- name: Install dependencies
run: npm ci
Expand Down

0 comments on commit 9809269

Please sign in to comment.