1.1.0 • Published 4 months ago

eslint-plugin-shuunen v1.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

eslint-plugin-shuunen

Install size Publish size Npm monthly downloads Code Climate maintainability Project license

logo

Demo

There not much to show, but here is a super useful eslint rule from this package in action :

demo

Installation

pnpm install -D eslint-plugin-shuunen

ES Module

In your eslint.config.js :

import { base } from 'eslint-plugin-shuunen/configs/base'
// import { browser } from 'eslint-plugin-shuunen/configs/browser'
// same pattern for the other configs

export default [    // 🥗 compose your salad
  ...base,          // 🥚 eslint/all + unicorn/all + perfectionist/natural + jsdoc
  // ...browser,    // 🥑 globals for browser
  // ...node,       // 🥕 globals for node
  // ...typescript, // 🍅 typescript/all
  // ...vue,        // 🥔 vue essential + stronglyRecommended + recommended
]

CommonJS (legacy)

Last working version with CommonJS is 0.4.0.

In your eslint.config.cjs :

const shuunen = require('eslint-plugin-shuunen')

/** @type {import('eslint').Linter.Config} */
module.exports = [               
  ...shuunen.configs.base,       
  ...shuunen.configs.browser,    
  ...shuunen.configs.node,       
  ...shuunen.configs.typescript, 
  ...shuunen.configs.vue,        
]

You can adjust the rules to your taste :

module.exports = [
  ...shuunen.configs.base,
  {
    rules: {
      'shuunen/some-rule': 'off',
      'unicorn/some-other-rule': 'warn',
    },
  },
]

Features

  • awesomely opinionated plugins & rules :sparkles:

TODO

  • use a plugin for react
  • merge typescript into base because it works on js ^^
  • search interesting plugins from eslint-plugin-antfu
  • search interesting plugins from eslint-plugin-hardcore
  • when available, add bun coverage line exclusions and enable 100% thresholds to ensure coverage is not decreasing
  • test to build a index.min.js file and see how it impact :
    • the install size
    • the performance
    • the source code readability in case of error

Thanks

  • Anthony Fu : for his config, for the inspiration
  • Eslint : super tool to find & fix problems
  • Github : for all their great work year after year, pushing OSS forward
  • Npm-parallel : to keep my npm scripts clean & readable
  • Repo-checker : eslint cover /src code and this tool the rest ^^
  • Shields.io : for the nice badges on top of this readme
  • Sindre Sorhus : for his awesome eslint-plugin-unicorn, for the inspiration
  • Watchlist : recursively watch a list of directories & run a command on any file system

Stargazers over time

Stargazers over time

Page views

Free Website Counter

1.1.0

4 months ago

1.0.2

5 months ago

1.0.1

5 months ago

1.0.0

5 months ago

0.4.0

7 months ago

0.3.0

1 year ago

0.2.0

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago