npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

eslint-config-adoyle-style

v7.0.0

Published

A set of eslint shareable configs for javascript code style, which follows ADoyle's code style.

Downloads

41

Readme

eslint-config-adoyle-style

Node Version Npm Package Version License NodeJS Package Dependencies

A set of eslint shareable configurations for javascript code style, which follows ADoyle's code style.

The configurations for browser and server development. It supports ES6, and React/JSX.

Feature

  • Code style with my best practice
  • Configurations for different environments
  • Optional eslint-plugin configurations
  • Semver-checking with eslint-plugin configuration

Installation

# ATTENTION: Use `npm install -E` to install exact version.
npm install -DE eslint-config-adoyle-style
npm install -D eslint@7

# Only for browser
npm install -D eslint-plugin-import eslint-plugin-jsx-a11y eslint-plugin-react

# If your project use babel
npm install -D eslint-plugin-babel babel-eslint

# If your project use jest
npm install -D eslint-plugin-jest

Usage

Edit your .eslintrc file. Apply different code styles as below:

For NodeJS

It's default for ES6 syntax and ES6 global variables:

root: true
extends: adoyle-style/node

overrides:
  # This override is optional. You should install eslint-plugin-jest by yourself.
  - files:
      - '**/*.test.js'
      - '**/__mocks__/*.js'
    extends: adoyle-style/node/testing

"adoyle-style/node/testing" includes much appropriate plugins which installed by yourself.

For Browser

It's default for ES5 syntax:

root: true
extends: adoyle-style/browser

If you use ES6 syntax:

root: true
extends:
  - adoyle-style/browser
  - adoyle-style/browser/es6

Additional Plugins

Additional React/JSX support:

root: true
extends:
  - adoyle-style/browser
  - adoyle-style/browser/es6
  - adoyle-style/plugin/import
  - adoyle-style/plugin/jsx-a11y
  - adoyle-style/plugin/react

Additional Jest support:

root: true
extends:
  - adoyle-style/node
  - adoyle-style/plugin/jest

Additional Babel support:

root: true
extends:
  - adoyle-style/node
  - adoyle-style/plugin/babel

Additional import support:

root: true
extends:
  - adoyle-style/node
  - adoyle-style/plugin/import

Attention!

You should install each devDependency by yourself when using the adoyle-style/plugin/*. And each package's version should under the optionalDependencies. Such as eslint-plugin-jsx-a11y, eslint-plugin-import, eslint-plugin-react.

For Test

@TODO

Develop

Show differences

# install node modules
npm i
# update eslint related deps to latest
./tools/update_eslint_deps
# To show all differences between latest and current rules.
./tools/what_news

Then edit rules by yourself.

Query Rule

# To query rule description
./tools/find_rule $rule_name

# For example
./tools/find_rule default-param-last
#{
#    "type": "suggestion",
#    "docs": {
#        "description": "enforce default parameters to be last",
#        "category": "Best Practices",
#        "recommended": false,
#        "url": "https://eslint.org/docs/rules/default-param-last"
#    },
#    "messages": {
#        "shouldBeLast": "Default parameters should be last."
#    }
#}

./tools/find_rule import/imports-first
# {
#     "type": "suggestion",
#     "docs": {
#         "url": "https://github.com/benmosher/eslint-plugin-import/blob/7b25c1cb95ee18acc1531002fd343e1e6031f9ed/docs/rules/imports-first.md"
#     },
#     "fixable": "code",
#     "deprecated": true
# }

Versioning

The versioning follows the rules of SemVer 2.0.0.

For more information on SemVer, please visit http://semver.org/.

Copyright and License

Copyright 2020-2021 ADoyle ([email protected]). The project is licensed under the BSD 3-clause License.

See the LICENSE file for the specific language governing permissions and limitations under the License.

See the NOTICE file distributed with this work for additional information regarding copyright ownership.