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

Deprecate Remix ESLint Config #7056

Closed
brophdawg11 opened this issue Aug 3, 2023 · 8 comments · Fixed by #7597
Closed

Deprecate Remix ESLint Config #7056

brophdawg11 opened this issue Aug 3, 2023 · 8 comments · Fixed by #7597
Assignees
Labels

Comments

@brophdawg11
Copy link
Contributor

ESLint is an opinion, that's more stacks territory than Remix territory.

Chatted with Michael and we think we should

  • First, remove this dependency from all of our templates
  • Also remove it from the stacks and duplicate the simplest set of plugins and recommended "extends" setups in stacks (react, typescript, jest, etc)
  • Wait a few months 🕐 🕐
  • Deprecate the @remix-run/eslint config in v2 with a warning on install
@sergiodxa
Copy link
Member

I think a plugin for Remix specific stuff would be great, with a default config, but the config is not related to Remix so it makes sense to deprecate it

@MichaelDeBoey
Copy link
Member

First, remove this dependency from all of our templates

@brophdawg11 Would this mean we have no ESLint setup at all anymore in the templates?
Or would we also just set the recommended configs on the plugins (ESLint, import, react, react-hooks, jsx-a11y) that are currently used in the config?
If so, I guess we can sometimes extend those recommended configs with some extra information (like providing the Form, Link & NavLink components to the configs) as that's what we currently also do and I think it can help people out

@brophdawg11
Copy link
Contributor Author

I believe that's where we're leaning. Templates are not meant to be opinionated - they're meant to be the simplest way to spin up a working Remix app. ESLint is, by design, quite opinionated so we'd like it to become a stacks choice. Even then we want the stacks to make very few choices and rely on best practices in the form of "recommended" presets. Then app teams are free to modify as needed once they create their app from a stack.

cmnord added a commit to cmnord/jep that referenced this issue Aug 21, 2023
cmnord added a commit to cmnord/jep that referenced this issue Aug 21, 2023
cmnord added a commit to cmnord/jep that referenced this issue Aug 21, 2023
@lpsinger
Copy link
Contributor

As a relative newcomer to modern JavaScript without a real code style of my own when I started using Remix, I appreciated the eslint plugin.

@brophdawg11
Copy link
Contributor Author

The stacks have been converted to simpler ESLint configs and no longer depend on @remix-run/eslint-config:

@Aqzhyi
Copy link

Aqzhyi commented Nov 5, 2023

about

Deprecate Remix ESLint Config #7056

Currently, can the configuration of @remix-run/eslint-config and @remix-run/eslint-config/node be easily removed from a remix project created through pnpx create-remix@latest?

The template used in this is .eslintrc, however, I want to use eslint.config.js.

Although the file extension of eslint.config.js is js, it appears to be esm and cannot import @remix-run/eslint-config.

This is my first attempt at remix. I would like to ask if it is safe for me to develop and use it in a production environment without introducing @remix-run/eslint-config into my eslint system?

many thanks 🫡

// @ts-check
import config from 'eslint-config-fsc-gov'
import remixConfig from '@remix-run/eslint-config'
                        ^^^^ ❌ Could not find a declaration file for module
import remixConfigNode from '@remix-run/eslint-config/node'
                            ^^^^ ❌ Could not find a declaration file for module

/** @type {typeof config} } */
export default [...config]
Oops! Something went wrong! :(

ESLint: 8.53.0

Error: Failed to patch ESLint because the calling module was not recognized.
If you are using a newer ESLint version that may be unsupported, please create a GitHub issue:
https://github.com/microsoft/rushstack/issues
    at Object.<anonymous> (/Users/asdf33/git/XXXX.com/XXXX-web-turbo/node_modules/.pnpm/@rushstack+eslint-patch@1.5.1/node_modules/@rushstack/eslint-patch/lib/_patch-base.js:164:19)
    at Module._compile (node:internal/modules/cjs/loader:1256:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
    at Module.load (node:internal/modules/cjs/loader:1119:32)
    at Module._load (node:internal/modules/cjs/loader:960:12)
    at Module.require (node:internal/modules/cjs/loader:1143:19)
    at require (node:internal/modules/cjs/helpers:119:18)
    at Object.<anonymous> (/Users/asdf33/git/XXXX.com/XXXX-web-turbo/node_modules/.pnpm/@rushstack+eslint-patch@1.5.1/node_modules/@rushstack/eslint-patch/lib/modern-module-resolution.js:11:23)
    at Module._compile (node:internal/modules/cjs/loader:1256:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
git -v git version 2.39.3 (Apple Git-145)
bun -v 1.0.8
node -v v18.18.0
pnpm -v 8.10.2

@brophdawg11
Copy link
Contributor Author

without introducing @remix-run/eslint-config into my eslint system

Yes, you do not need @remix-run/eslint-config and it's no longer part of our stacks. We are moving towards a default slimmed down eslint config such as https://github.com/remix-run/indie-stack/blob/main/.eslintrc.js

@brophdawg11
Copy link
Contributor Author

PR to remove this dependency from the templates: #7597

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants