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-cecilia

v2.10.1

Published

ESLint configuration for awesome projects

Downloads

119

Readme

Welcome to ESLint config Cecilia

npm version tests license

ESLint configuration for my projects.

ESLint config Cecilia is an opinionated shareable ESLint config used in my JavaScript projects (Vanilla.js, React.js or Node.js).

Table of Contents

  1. Goals
  2. Installation
  3. Credits
  4. Contributing
  5. Questions
  6. License

Goals

  • I want to use ESLint to lint my files
  • I want to use Prettier to format my code
  • I want to base my rules on the major configs, such as eslint-config-airbnb
  • I want to keep the code clean and consistent across several projects
  • I don't want to install/maintain/configure ESLint/Prettier/plugins/etc. independently in all projects

Installation

Set up the config automatically (recommended)

With npm

npm i -D eslint-config-cecilia
npx cecilia
  1. Select "1" to install the necessary dependencies with npm
  2. Select "y" to create the .eslintrc.js file
  3. Select "y" to create the .prettierrc.js file
  4. Select "y" to add the lint script commands in your package.json

With Yarn

yarn add --dev eslint-config-cecilia
yarn cecilia
  1. Select "2" to install the necessary dependencies with Yarn
  2. Select "y" to create the .eslintrc.js file
  3. Select "y" to create the .prettierrc.js file
  4. Select "y" to add the lint script commands in your package.json

Set up the config manually

With npm

npm i -D eslint-config-cecilia eslint prettier eslint-config-prettier eslint-plugin-prettier eslint-config-airbnb eslint-plugin-import eslint-plugin-jsdoc eslint-plugin-jsx-a11y eslint-plugin-react eslint-plugin-react-hooks eslint-plugin-unicorn

With Yarn

yarn add --dev eslint-config-cecilia eslint prettier eslint-config-prettier eslint-plugin-prettier eslint-config-airbnb eslint-plugin-import eslint-plugin-jsdoc eslint-plugin-jsx-a11y eslint-plugin-react eslint-plugin-react-hooks eslint-plugin-unicorn

Create a .eslintrc.js file in your project root directory and use the extends attribute.

Paste this code to extend the ESLint ruleset:

module.exports = {
  extends: 'cecilia',
}

Optional - Override Rules

For more information, see "Configuring Rules" in the ESLint Help.

module.exports = {
  extends: 'cecilia',
  rules: {
    //
    // rules to override.
    //
  }
}

Pro tip

Check the list of available rules.

Optional - Specifying Environments

For more information, see "Specifying Environments" in the ESLint Help.

module.exports = {
  extends: 'cecilia',
  env: {
    browser: true,
    node: true,
    ...
  },
}

Create a .prettierrc.js file in your project root directory and change some rules.

module.exports = {
  semi: false,
  singleQuote: true,
  trailingComma: 'all',
}

Add scripts to the package.json file

Open the package.json file and add the following scripts entries:

  ...

  "scripts": {
    "lint": "eslint .",
    "lint:fix": "eslint . --fix",
    "format": "prettier --write './**/*.{js,jsx,json}'"
  },

  ...

Usage

Run the script

yarn lint or npm run lint to lint your code.

yarn lint:fix or npm run lint:fix to lint and fix your code.

yarn format or npm run format to format your code.

Pro tip

Install ESLint and Prettier extensions for Visual Studio Code.

Credits

Contributing

Want to contribute? All contributions are welcome. Read the contributing guide.

Questions

If you have questions tweet me at @sandro_m_m or open an issue.

License

This project is licensed under the MIT License - see the LICENSE file for details

~ sharing is caring ~

This project helped you? Please consider giving this repository a star :star:.