nextcloud-libraries / nextcloud-libraries/eslint-config
[RFC] Add strict config(s) for optioned rules
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 9
- Forks
- 4
- Avg merge
- 5h 5m
- Merged PRs (30d)
- 24
Description
Problem
Some rules are simple:
- Don't require semantic changes (e.g. renaming a variable or changing declaration context)
- Always work well (e.g. trailing comma never hurts)
- Can be auto-fixed
However, some rules are problematic to apply:
- Require semantic changes
- Make readability worth in some cases
- Require significant manual changes (e.g. rewriting component to TS or renaming components)
- Can be auto-fixed, but with LARGE changes
- Or just too discussable
Examples:
- Shadowing:
- Single-line arrays/objects:
- Top-level function style
- TS-first rules in a mixed environment
- Forced
<script setup lang="ts"> - Forced
<script> - <template> - <style>order in components - Forced multi-word component naming
- Following Vue style guide to have first attribute on a new line (diff safe)
Proposal
Instead of hot discussions, local rule overrides and avoiding "painful" rules, we can provide them in a additional config
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the repository's existing ESLint configurations and the referenced rule discussions and pull requests. Define the additional configuration's scope and determine how the listed optioned rules should be separated from the existing configuration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- eslint, typescript
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100