Skip to content

Commit

Permalink
chore: have eslint report unused eslint comments (#4863)
Browse files Browse the repository at this point in the history
* chore: have eslint report unused eslint comments

Signed-off-by: Logan McAnsh <logan@mcan.sh>

* chore: remove additional comment

Signed-off-by: Logan McAnsh <logan@mcan.sh>
  • Loading branch information
mcansh authored Dec 14, 2022
1 parent a77f611 commit 1247f4b
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 6 deletions.
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 .",
"lint": "eslint --cache .",
"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

0 comments on commit 1247f4b

Please sign in to comment.