All Projects → merkle-open → eslint-config

merkle-open / eslint-config

Licence: MIT license
Default configurations for eslint

Programming Languages

javascript
184084 projects - #8 most used programming language
typescript
32286 projects

Projects that are alternatives of or similar to eslint-config

eslint-config-fullstack
A complete ESLint config file to help students avoid errors and learn best practices
Stars: ✭ 16 (+23.08%)
Mutual labels:  eslintconfig, eslintrc
eslint-config-with-prettier
Eslint config with prettier
Stars: ✭ 39 (+200%)
Mutual labels:  eslintrc
eslint-config-mingelz
A shared ESLint configuration with Chinese comments. 一份带有完整中文注释的 ESLint 规则。
Stars: ✭ 15 (+15.38%)
Mutual labels:  eslintconfig
eslint-config
An ESLint shareable config that I used in my projects
Stars: ✭ 15 (+15.38%)
Mutual labels:  eslintconfig
eslint-define-config
Provide a defineConfig function for .eslintrc.js files
Stars: ✭ 61 (+369.23%)
Mutual labels:  eslintconfig
luozhu
Luozhu's practice in Front End Engineering and Components Development.
Stars: ✭ 28 (+115.38%)
Mutual labels:  eslintconfig
eslint-config-hardcore
The most strict (yet practical) ESLint config. 34 plugins. 1047 rules.
Stars: ✭ 168 (+1192.31%)
Mutual labels:  eslintconfig

ESLint config

Build Status npm Codestyle

Installation

$ npm install --save-dev eslint eslint-plugin-import @namics/eslint-config

Usage Typescript (recommended)

  • @namics/eslint-config/configurations/typescript-browser - typescript + browser
  • @namics/eslint-config/configurations/typescript-react - typescript + react
  • @namics/eslint-config/configurations/typescript-node - typescript + node

package.json

{
  "scripts": {
    "lint:ts": "eslint . --ext .jsx,.js,.ts,.tsx"
  }
}

Enabling ESLint on TS files in VSCode

You need to update the eslint.validate setting to:

"eslint.validate": [
  "javascript",
  "javascriptreact",
  "typescript",
  "typescriptreact"
]

Usage ES8 (ES2017)

  • @namics/eslint-config/configurations/es8-browser - ES8 + browser
  • @namics/eslint-config/configurations/es8-react - ES8 + react
  • @namics/eslint-config/configurations/es8-node - ES8 + node

Usage ES7 (ES2016)

  • @namics/eslint-config/configurations/es7-browser - ES7 + browser (deprecated)
  • @namics/eslint-config/configurations/es7-react - ES7 + react (deprecated)
  • @namics/eslint-config/configurations/es7-node - ES7 + node

Usage ES6 (ES2015) - deprecated

  • @namics/eslint-config/configurations/es6-browser - ES6 + browser (deprecated)
  • @namics/eslint-config/configurations/es6-react - ES6 + react (deprecated)
  • @namics/eslint-config/configurations/es6-node - ES6 + node (deprecated)

Usage with Prettier

.eslintrc.js (add globals here if needed)

module.exports = {
  extends: require.resolve('@namics/eslint-config/configurations/es8-browser.js'),
};

.eslintignore

/.idea/
/node_modules/

package.json

"scripts": {
  "lint": "npm run lint:js",
  "lint:js": "eslint ."
},

then run npm run lint

Example usage in project tree

  • .eslintrc.js (es8-react)
  • .eslintignore
  • src
    • app.jsx
  • test
    • .eslintrc.js (es8-node)
    • index.js
  • scripts
    • .eslintrc.js (es6-node)
    • index.js

Documentation

Build release

  1. Create feature or bugfix branch based on master
  2. Make changes and create pull request, add reviewer, wait for approval
  3. Merge pull request into master
  4. Prepare release notes, adjust package.json to next version ([Semantic Versioning](semantic versioning))
  5. Run npm publish (locally) to create npm version
  6. Create and push git tag for version
  7. Add release notes on GitHub

Thanks to

License

MIT License

Changelog

Please see the Releases

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].