Skip to content
Closed
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
46 changes: 46 additions & 0 deletions templates/remix/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
// ESLint configuration recommended for Remix templates
// This is a minimal, modern example that works for both JavaScript and TypeScript projects.
// Adjust parser/plugins according to your project's needs.

module.exports = {
root: true,
env: {
browser: true,
node: true,
es2024: true,
},
extends: [
"eslint:recommended",
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"plugin:jsx-a11y/recommended",
"prettier"
],
settings: {
react: {
version: "detect"
}
},
parserOptions: {
ecmaVersion: "latest",
sourceType: "module"
},
rules: {
"react/react-in-jsx-scope": "off"
},
overrides: [
{
files: ["*.ts", "*.tsx"],
parser: "@typescript-eslint/parser",
extends: ["plugin:@typescript-eslint/recommended"],
parserOptions: {
project: "./tsconfig.json",
tsconfigRootDir: __dirname,
}
},
{
files: [".eslintrc.cjs", "scripts/**/*.js"],
env: { node: true }
}
]
};
7 changes: 7 additions & 0 deletions templates/remix/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Remix template ESLint example

This directory contains an example `.eslintrc.cjs` file used by the Remix templates.
It provides a starting point for ESLint configuration for both JavaScript and TypeScript projects.

If you use `create-remix` to generate a new project and need an ESLint config, copy `.eslintrc.cjs`
from this folder into your project root and adjust the `overrides` and `parserOptions.project` as needed.