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

Convert plugin to ESM and split large files #533

Merged
merged 11 commits into from
Jan 23, 2023
28 changes: 0 additions & 28 deletions .eslintrc.js

This file was deleted.

20 changes: 20 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"env": {
"es6": true,
"node": true,
"jest": true
},
"extends": ["eslint:recommended", "plugin:import/recommended"],
"globals": {
"cy": true
},

"parserOptions": {
"sourceType": "module",
"ecmaVersion": "latest"
},
"rules": {
"import/extensions": ["error", "always"],
"import/order": ["error", { "newlines-between": "always" }]
}
}
8 changes: 5 additions & 3 deletions cypress.config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
const { defineConfig } = require('cypress');
import { defineConfig } from 'cypress';

module.exports = defineConfig({
import plugin from './cypress/plugins/index.js';

export default defineConfig({
e2e: {
setupNodeEvents(on, config) {
return require('./cypress/plugins/index.js')(on, config);
return plugin(on, config);
},
},
});
2 changes: 1 addition & 1 deletion cypress/plugins/index.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
module.exports = () => {}
export default () => {};
6 changes: 6 additions & 0 deletions jest.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
roots: ['<rootDir>/src'],
testMatch: ['**/__tests__/**/*.+(ts|js)', '**/?(*.)+(spec|test).+(ts|js)'],
setupFiles: ['<rootDir>/test/setup.js'],
transform: {},
};
Loading