Propose adding @e18e/eslint-plugin to Ember CLI blueprints#1167
Propose adding @e18e/eslint-plugin to Ember CLI blueprints#1167
Conversation
Co-authored-by: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com>
Co-authored-by: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com>
| - Similar to the app blueprint, add the dependency and configure ESLint to use the plugin's recommended rules | ||
| - This would be done in a manner similar to how `eslint-plugin-ember` is currently added to addon blueprints | ||
|
|
||
| ### Configuration Example: |
There was a problem hiding this comment.
just an example -- I think we should do it this way:
import e18e from '@e18e/eslint-plugin';
import json from '@eslint/json';
import {defineConfig} from 'eslint/config';
export default defineConfig([
{
files: ['package.json'],
language: 'json/json',
plugins: {
e18e,
json
},
extends: ['e18e/recommended'],
}
]);this also implies json formatting... which I don't think wee have.
should do an RFC for just propsing a new total config? or do we RFC each change?
json formatting is pretty essential 🤔
they say,
Some rules (e.g. ban-dependencies) can be used against your package.json.
There was a problem hiding this comment.
Updated the configuration example to include JSON linting support with @eslint/json as suggested (commit d441940)
|
|
||
| ## How we teach this | ||
|
|
||
| ### Documentation Updates: |
There was a problem hiding this comment.
@copilot any documentation update here would require new pages, because I don't think we explain our approach to linting anywhere?
this would be in the ember-learn/guides-source repo if it exists.
These would be good docs to have -- but who would write them? 😉
There was a problem hiding this comment.
Updated the documentation section to note that new pages in ember-learn/guides-source would be needed but are outside the scope of this RFC (commit d441940)
…essary sections Co-authored-by: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com>
Co-authored-by: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com>
Co-authored-by: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com>
Co-authored-by: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com>
Co-authored-by: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com>
Propose @e18e/eslint-plugin in Blueprints
Rendered
Summary
Proposes adding @e18e/eslint-plugin to default app and addon blueprints. This plugin enforces modern JavaScript patterns, performance optimizations, and recommended module replacements through auto-fixable ESLint rules.
Key additions:
Array.at(),Array.includes(),Array.toReversed(), etc.package.jsonfiles using@eslint/jsonImplementation:
package.json(latest version)@e18e/eslint-plugin/recommendedpackage.jsonApproach:
Drawbacks:
This pull request is proposing a new RFC.
To succeed, it will need to pass into the Exploring Stage, followed by the Accepted Stage.
A Proposed or Exploring RFC may also move to the Closed Stage if it is withdrawn by the author or if it is rejected by the Ember team. This requires an "FCP to Close" period.
An FCP is required before merging this PR to advance to Accepted.
Upon merging this PR, automation will open a draft PR for this RFC to move to the Ready for Released Stage.
Exploring Stage Description
This stage is entered when the Ember team believes the concept described in the RFC should be pursued, but the RFC may still need some more work, discussion, answers to open questions, and/or a champion before it can move to the next stage.
An RFC is moved into Exploring with consensus of the relevant teams. The relevant team expects to spend time helping to refine the proposal. The RFC remains a PR and will have an
Exploringlabel applied.An Exploring RFC that is successfully completed can move to Accepted with an FCP is required as in the existing process. It may also be moved to Closed with an FCP.
Accepted Stage Description
To move into the "accepted stage" the RFC must have complete prose and have successfully passed through an "FCP to Accept" period in which the community has weighed in and consensus has been achieved on the direction. The relevant teams believe that the proposal is well-specified and ready for implementation. The RFC has a champion within one of the relevant teams.
If there are unanswered questions, we have outlined them and expect that they will be answered before Ready for Release.
When the RFC is accepted, the PR will be merged, and automation will open a new PR to move the RFC to the Ready for Release stage. That PR should be used to track implementation progress and gain consensus to move to the next stage.
Checklist to move to Exploring
S-Proposedis removed from the PR and the labelS-Exploringis added.Checklist to move to Accepted
Final Comment Periodlabel has been added to start the FCP💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.