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

feat: update @typescript-eslint/eslint-plugin to version 7.18.0 #1618

Open
wants to merge 15 commits into
base: develop
Choose a base branch
from
Open
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
6 changes: 0 additions & 6 deletions .eslintignore

This file was deleted.

163 changes: 0 additions & 163 deletions .eslintrc

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
with:
github_token: ${{ secrets.github_token }}
reporter: github-pr-check
eslint_flags: '--ext .js --ext .jsx ./src/'
eslint_flags: './src/*/**.js ./src/*/**.jsx'
- name: Lint Javascript
run: yarn lint:js

Expand Down
2 changes: 1 addition & 1 deletion cypress.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// eslint-disable-next-line import/no-extraneous-dependencies
const { defineConfig } = require("cypress");
const plugins = require("./cypress/plugins");
const plugins = require("./cypress/plugins").default;

module.exports = defineConfig({
projectId: "4trcdv",
Expand Down
63 changes: 40 additions & 23 deletions cypress/plugins/index.js
Original file line number Diff line number Diff line change
@@ -1,28 +1,45 @@
// Cypress no longer natively supports plugins file, but we keep it for better code abstraction
// https://docs.cypress.io/app/references/migration-guide#Plugins-File-Removed
import task from "@cypress/code-coverage/task";
import webpackPreprocessor from "@cypress/webpack-preprocessor";

const task = require("@cypress/code-coverage/task");
const browserify = require("@cypress/browserify-preprocessor");

// In order to use both babelrc and typescript in browserify
// we copy the functionality from @cypress/code-coverage/use-babelrc
// and merge it with the typescript setting.
// The plugin @cypress/code-coverage/use-babelrc basically
// sets babelrc: true in the browserify options.
const { browserifyOptions } = browserify.defaultOptions;
browserifyOptions.transform[1][1].babelrc = true;

module.exports = (on, config) => {
export default (on, config) => {
task(on, config);
on(
"file:preprocessor",
browserify({
typescript: require.resolve("typescript"),
browserifyOptions: {
extensions: [".js", ".ts"],
...browserifyOptions

const options = {
webpackOptions: {
resolve: {
extensions: [".ts", ".tsx", ".js", ".jsx"],
modules: ["node_modules", "src"]
},
module: {
rules: [
{
test: /\.tsx?$/,
use: [
{
loader: "ts-loader",
options: {
transpileOnly: true,
compilerOptions: {
module: "esnext",
target: "es5",
lib: ["es5", "dom"],
jsx: "react",
allowJs: true,
esModuleInterop: true,
allowSyntheticDefaultImports: true,
noEmit: false
}
}
}
],
exclude: /node_modules/
}
]
}
})
);
}
};

on("file:preprocessor", webpackPreprocessor(options));

return config;
};
2 changes: 1 addition & 1 deletion cypress/utils/graphql-test-utils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CyHttpMessages } from "cypress/types/net-stubbing";
import type { CyHttpMessages } from "../../node_modules/cypress/types/net-stubbing.js";

// Utility to match GraphQL mutation based on the operation name
export const hasOperationName = (
Expand Down
Loading
Loading