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: have eslint report unused eslint comments #4863

Merged
merged 2 commits into from
Dec 14, 2022
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
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
**/build/
**/tests/__snapshots/
**/node_modules/
!.eslintrc.js
.tmp
/playground
**/__tests__/fixtures
**/__tests__/**/*/fixtures
/packages/*/dist/

# Deno
integration/helpers/deno-template
Expand Down
4 changes: 4 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,8 @@ module.exports = {
},
},
],
// Report unused `eslint-disable` comments.
reportUnusedDisableDirectives: true,
// Tell ESLint not to ignore dot-files, which are ignored by default.
ignorePatterns: ["!.*.js"],
};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"format": "prettier --ignore-path .eslintignore --write ./ && npm run lint:fix",
"format:deno": "deno fmt integration/helpers/deno-template packages/remix-deno templates/deno --ignore=packages/remix-deno/node_modules",
"license": "node ./scripts/license.js",
"lint": "eslint --cache --ext .tsx,.ts,.js,.jsx,.md .",
MichaelDeBoey marked this conversation as resolved.
Show resolved Hide resolved
"lint": "eslint --cache .",
MichaelDeBoey marked this conversation as resolved.
Show resolved Hide resolved
"lint:deno": "deno lint integration/helpers/deno-template packages/remix-deno templates/deno --ignore=packages/remix-deno/node_modules",
"lint:fix": "yarn lint --fix",
"playground:new": "node ./scripts/playground/new.js",
Expand Down
2 changes: 0 additions & 2 deletions packages/remix-react/__tests__/hook-types-test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ function isEqual<A, B>(
arg: A extends B ? (B extends A ? true : false) : false
): void {}

// not sure why `eslint` thinks the `T` generic is not used...
// eslint-disable-next-line @typescript-eslint/no-unused-vars
type LoaderData<T> = ReturnType<typeof useLoaderData<T>>;

describe("useLoaderData", () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/remix-server-runtime/rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-disable no-restricted-globals, import/no-nodejs-modules */
/* eslint-disable import/no-nodejs-modules */
const path = require("path");
const babel = require("@rollup/plugin-babel").default;
const nodeResolve = require("@rollup/plugin-node-resolve").default;
Expand Down
1 change: 0 additions & 1 deletion packages/remix/rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable import/no-extraneous-dependencies */
const babel = require("@rollup/plugin-babel").default;
const path = require("path");

Expand Down