-
-
Notifications
You must be signed in to change notification settings - Fork 638
Resolve 14.1.1 incompatibility with eslint & make sure that spec/dummy is linted by eslint #1693
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
Changes from all commits
9c3972d
eb9b227
e8bdc88
60e36b6
ff274a8
7878e9b
07e9e2b
83d0d2e
e844e79
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -41,14 +41,19 @@ rules: | |||||
| object-curly-newline: 0 | ||||||
| no-restricted-syntax: ["error", "SequenceExpression"] | ||||||
| # https://stackoverflow.com/a/59268871/5241481 | ||||||
| import/extensions: ['error', 'ignorePackages', {"js": 'never',"ts": "never"}] | ||||||
| import/extensions: ['error', 'ignorePackages', {"js": 'never', "jsx": 'never', "ts": "never"}] | ||||||
| import/first: 0 | ||||||
|
|
||||||
| # https://github.com/benmosher/eslint-plugin-import/issues/340 | ||||||
| import/no-extraneous-dependencies: 0 | ||||||
|
|
||||||
| react/forbid-prop-types: 0 | ||||||
| jsx-a11y/anchor-is-valid: 0 | ||||||
|
|
||||||
| settings: | ||||||
| import/core-modules: | ||||||
| - react-redux | ||||||
| import/resolver: | ||||||
| alias: [ ["Assets", "./spec/dummy/client/app/assets"] ] | ||||||
| node: | ||||||
| extensions: [".js", ".ts", ".d.ts"] | ||||||
| extensions: [".js", ".jsx", ".ts", ".d.ts"] | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
to avoid forgetting if we add TSX examples later. |
||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -104,5 +104,8 @@ | |
| <li> | ||
| <%= link_to "Incorrectly wrapping a pure component in a function", pure_component_wrapped_in_function_path %> | ||
| </li> | ||
| <li> | ||
| <%= link_to "TurboStream Demo", turbo_frame_tag_hello_world_path %> | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this something that should have been here before? Doesn't seem related to the other changes.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, this link should have been added earlier. |
||
| </li> | ||
| </ul> | ||
| <hr/> | ||
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| // import statement added by react_on_rails:generate_packs rake task | ||
| import './../generated/server-bundle-generated.js'; | ||
| import './../generated/server-bundle-generated.js'; // eslint-disable-line import/extensions | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we update the task to generate it without extension instead? In a separate PR.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think so. |
||
| // Shows the mapping from the exported object to the name used by the server rendering. | ||
| import ReactOnRails from 'react-on-rails'; | ||
| // Example of server rendering with no React | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| import HelloWorldReScript from '../components/HelloWorldReScript.res.js'; | ||
| import HelloWorldReScript from '../components/HelloWorldReScript.res.js'; // eslint-disable-line import/no-unresolved | ||
|
|
||
| export default HelloWorldReScript; |
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -5,7 +5,7 @@ const baseClientWebpackConfig = generateWebpackConfig(); | |||||||
|
|
||||||||
| const webpack = require('webpack'); | ||||||||
|
|
||||||||
| const aliasConfig = require('./alias.js'); | ||||||||
| const aliasConfig = require('./alias'); | ||||||||
|
|
||||||||
| const commonOptions = { | ||||||||
| resolve: { | ||||||||
|
|
@@ -23,7 +23,7 @@ const sassLoaderConfig = { | |||||||
|
|
||||||||
| const scssConfigIndex = baseClientWebpackConfig.module.rules.findIndex((config) => | ||||||||
| '.scss'.match(config.test), | ||||||||
| ); | ||||||||
| ); // eslint-disable-next-line no-undef | ||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
| baseClientWebpackConfig.module.rules[scssConfigIndex]?.use.push(sassLoaderConfig); | ||||||||
|
|
||||||||
| // add jquery | ||||||||
|
|
||||||||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just in case we want to add more Rescript components later.