eslint-config-canonical
eslint-plugin-storybook
Our great sponsors
eslint-config-canonical | eslint-plugin-storybook | |
---|---|---|
7 | 3 | |
570 | 233 | |
- | 2.6% | |
8.2 | 7.1 | |
3 months ago | 10 days ago | |
JavaScript | TypeScript | |
GNU General Public License v3.0 or later | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
eslint-config-canonical
-
ESLint-config-canonical: 1k rules ESLint rules
https://github.com/gajus/eslint-config-canonical
I will repost this every couple of years, as it now has been 8 years since I regularly update this config. For most projects, adopting this is going to be as simple as:
{
- Show HN: Canonical – 1k ESLint rules to automate code conventions
-
semver: v1 vs v1000
It's something that keeps coming up in GitHub issues on my various projects... they point at my project version, which could be v7, v28, v33, and then say "This project versioning is bad." or "This project API is unstable.", etc. and then compare them to projects that are v1, as if that somehow proves their point.
-
Why is is prettier used if eslint can format?
For anyone would would like to migrate from Prettier to ESLint, https://github.com/gajus/eslint-config-canonical covers everything that Prettier does and a lot (a lot) more.
-
ESLint plugin for Storybook
Should we add it to https://github.com/gajus/eslint-config-canonical ?
- eslint-config-canonical: 1,000+ rules ESLint rules
eslint-plugin-storybook
-
What is Storybook Play function?
Reference: https://github.com/storybookjs/eslint-plugin-storybook/blob/main/docs/rules/context-in-play-function.md
-
npx storybook init does not work properly? It installs react and react-dom, also the components are full of errors?! Am I doing something wrong?
{ "root": true, "ignorePatterns": ["projects/**/*"], "rules": { "prettier/prettier": [ "error", { "endOfLine": "auto" } ] }, "overrides": [ { // TODO: find a way to apply rules on all files ending with .ts except for files ending with .stories.ts "files": ["*.ts"], "extends": [ "eslint:recommended", "plugin:@typescript-eslint/recommended", "plugin:@angular-eslint/recommended", "plugin:@angular-eslint/template/process-inline-templates", "plugin:prettier/recommended" ], "rules": { // https://github.com/angular-eslint/angular-eslint/tree/main/packages/eslint-plugin/docs/rules "@angular-eslint/directive-selector": [ "error", { "type": "attribute", "prefix": "hv", "style": "camelCase" } ], "@angular-eslint/component-selector": [ "error", { "type": "element", "prefix": "hv", "style": "kebab-case" } ], // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules "@typescript-eslint/member-ordering": "error", "@typescript-eslint/naming-convention": "error", // https://eslint.org/docs/latest/rules/ "default-case": "error", "default-case-last": "error" } }, { "files": ["*.html"], "extends": [ "plugin:@angular-eslint/template/recommended", "plugin:prettier/recommended" ], "rules": { // https://github.com/angular-eslint/angular-eslint/tree/main/packages/eslint-plugin-template/docs/rules "@angular-eslint/template/no-duplicate-attributes": ["error"], "@angular-eslint/template/attributes-order": ["error"], "@angular-eslint/template/no-call-expression": [ "error" ], "@angular-eslint/template/accessibility-elements-content": [ "error", { "allowList": [ "ariaLabel" ] } ], "@angular-eslint/template/accessibility-valid-aria": [ "error" ] } }, { "files": ["*.stories.@(ts|mjs|cjs)"], "extends": ["plugin:storybook/recommended"] // https://github.com/storybookjs/eslint-plugin-storybook/tree/main/docs/rules // "rules": {} } ] }
-
ESLint plugin for Storybook
Maintainer here! Thanks for sharing that. I feel the same pain as you, I created a GH issue for it if you ever want to keep track of that: https://github.com/storybookjs/eslint-plugin-storybook/issues/71
What are some alternatives?
eslint-plugin-unicorn - More than 100 powerful ESLint rules
quick-lint-js - quick-lint-js finds bugs in JavaScript programs
angular-eslint - :sparkles: Monorepo for all the tooling related to using ESLint with Angular
typescript-eslint - :sparkles: Monorepo for all the tooling which enables ESLint to support TypeScript
eslint-plugin-perfectionist - 🦄 ESLint plugin for sorting various data such as objects, imports, types, enums, JSX props, etc.
eslint-plugin-canonical - ESLint rules for Canonical ruleset.
roarr - JSON logger for Node.js and browser.
eslint-config-prettier - Turns off all rules that are unnecessary or might conflict with Prettier.
rustfmt - Format Rust code
slonik - A Node.js PostgreSQL client with runtime and build time type safety, and composable SQL.
semantic-release - :package::rocket: Fully automated version management and package publishing