New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@bchteam/eslint-config

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bchteam/eslint-config

ESLint and Stylelint configs for Black Wall projects

  • 3.0.0-beta1
  • npm
  • Socket score

Version published
Weekly downloads
4
decreased by-33.33%
Maintainers
1
Weekly downloads
 
Created
Source

@bchteam/eslint-config

ESlint and Stylelint config used for our @bchteam projects

Usage

  1. Add this package to your devDependencies
npm i -D @bchteam/eslint-config
  1. Run post-install script:
npx bch-eslint-config --include=eslint,stylelint
npm i

The script adds automatically peer dependencies and linting scripts to package.json and creates.eslintrc.json and .stylelintrc.json files.

  1. Add additional features if you need them:
npx bch-eslint-config --include=vue,jest,cypress,import-webpack,scss
npm i

All features

All settings below are set with --include option and removed with --remove option automatically. But you can set/remove them manually.

eslint:

Adds devDependencies babel-eslint@^10.0.1, eslint@^5.9.0, eslint-config-standard@^12.0.0, eslint-plugin-import@^2.14.0, eslint-plugin-node@^8.0.0, eslint-plugin-promise@^4.0.1, eslint-plugin-standard@^4.0.0.

Adds lint:js : eslint ./ --ext .js and lint:js-fix : npm run lint:style -- --fix scripts to package.json.

Adds part npm run lint:js to script lint in package.json.

Adds part npm run lint:js-fix to script lint-fix in package.json.

Adds @bchteam/eslint-config/js-style/base to extends part of .eslintrc.json.

stylelint:

Adds devDependencies stylelint@^9.10.0 and stylelint-config-standard@^18.2.0.

Adds lint:style : stylelint ./**/*.css ./**/*.html and lint:style-fix : npm run lint:style -- --fix scripts to package.json.

Adds part npm run lint:style to script lint in package.json.

Adds part npm run lint:style-fix to script lint in package.json.

Adds @bchteam/eslint-config/css-style/base to extends part of .stylelintrc.json.

vue:

Adds devDependency eslint-plugin-vue@^5.0.0

Adds part --ext .vue to script lint:js in package.json. Adds part ./**/*.vue to script lint:style in package.json.

Adds @bchteam/eslint-config/js-style/vue to extends part of .eslintrc.json.

jest:

Adds devDependency eslint-plugin-jest@^22.3.0

Adds @bchteam/eslint-config/js-style/jest to extends part of .eslintrc.json.

cypress:

Adds devDependency eslint-plugin-cypress@^2.2.0

Adds @bchteam/eslint-config/js-style/cypress to extends part of .eslintrc.json.

scss:

Adds devDependencies stylelint-scss@^3.5.3 and stylelint-config-recommended-scss@3.2.0.

Adds @bchteam/eslint-config/js-style/cypress to extends part of .stylelintrc.json.

import-webpack:

Adds devDependency eslint-import-resolver-webpack@0.11.0.

Adds setting for detecting imports based on webpack in .eslintrc.json:

// .eslintrc.json
{
  // ...
  "settings": {
    "import/resolver": {
      "webpack": {
        "config": "webpack.config.js"
      }
    }
  },
  // ...
}

The post-install script doesn't create webpack.config.js automatically!

If you need it only for resolving imports with aliases @ and ~, this example of webpack.config.js can be used:

// Minimal Webpack config for resolving imports by ESLint with aliases @ and ~
// This is not actually used by the project
module.exports = {
  resolve: {
    alias: {
      '~': __dirname,
      '@': __dirname,
    },
  },
}

Remove features

Run the script to remove unneeded features:

npx bch-eslint-config --remove=jest,scss

Or remove all features:

npx bch-eslint-config --remove

License

Setup inspired by eslint-config-standard and @nuxt/eslint-config

MIT - Zakharov Sergey zakhse@yandex.ru

FAQs

Package last updated on 25 Jun 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc