From 10adcf1deea512aa425f749e415606a19f875779 Mon Sep 17 00:00:00 2001 From: evilebottnawi Date: Fri, 7 Dec 2018 17:34:53 +0300 Subject: [PATCH] chore: prepare `91.0.0` release --- CHANGELOG.md | 4 ++++ README.md | 47 +++++++++++++++++++++++++++++++++++++++------ lib/config/react.js | 7 +------ package-lock.json | 2 +- package.json | 2 +- 5 files changed, 48 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 91aff8b..4d1d6a4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org). Except add new rule (it is breaking changed by default). +## 91.0.0 - 2018-12-07 + +- Changed: `react` present doesn't extend `esnext` preset. + ## 90.0.0 - 2018-12-06 - Added: `react/no-unescaped-entities` rule. diff --git a/README.md b/README.md index 4454b43..49ffe5b 100644 --- a/README.md +++ b/README.md @@ -78,6 +78,7 @@ following configuration file: { "extends": [ "plugin:itgalaxy/esnext", + "plugin:itgalaxy/react", "plugin:itgalaxy/lodash", "plugin:itgalaxy/mocha" ] @@ -90,22 +91,37 @@ Notice: presets **"plugin:itgalaxy/esnext"** or **"plugin:itgalaxy/es5"** always This plugin provides the following core configurations: -- [all](lib/config/all.js): Use only for internal testing. - -- [core](lib/config/core.js): Don't use. It is for internal purposes. - - [es5](lib/config/es5.js): Use this for legacy projects. +```json +{ + "extends": ["plugin:itgalaxy/es5"] +} +``` + - [esnext](lib/config/esnext.js): Use this for anything written with ES2015+ features. +```json +{ + "extends": ["plugin:itgalaxy/esnext"] +} +``` + - [html](lib/config/html.js): Allow linting `JavaScript` in `HTML` (and `HTML` based) files (don't forget add `.html` to `--ext` CLI argument). +```json +{ + "extends": ["plugin:itgalaxy/esnext", "plugin:itgalaxy/html"] +} +``` + - [markdown](lib/config/markdown.js): Allow linting `JavaScript` in `markdown` files (don't forget add `.md` to `--ext` CLI argument). Use this configuration: ```js module.exports = { + extends: ["plugin:itgalaxy/esnext"], overrides: [ { files: ["**/*.md"], @@ -131,10 +147,29 @@ module.exports = { - [node](lib/config/node.js): Use this for nodejs projects. +Example: + +```json +{ + "extends": ["plugin:itgalaxy/esnext", "plugin:itgalaxy/node"] +} +``` + - [react](lib/config/react.js): Use this for React projects. -This plugin also provides the following tool-specific configurations, which can -be used on top of the core configurations: +Example: + +```json +{ + "extends": ["plugin:itgalaxy/esnext", "plugin:itgalaxy/react"] +} +``` + +- [all](lib/config/all.js): Don't use. It is for internal purposes (testings and tools). + +- [core](lib/config/core.js): Don't use. It is for internal purposes (testings and tools). + +This plugin also provides the following tool-specific configurations, which can be used on top of the core configurations: - [AVA](lib/config/ava.js): Use this for projects that use the [AVA](https://github.com/sindresorhus/ava). diff --git a/lib/config/react.js b/lib/config/react.js index 5dc7526..9e765f2 100644 --- a/lib/config/react.js +++ b/lib/config/react.js @@ -1,6 +1,5 @@ "use strict"; -const path = require("path"); const jsxA11yRules = require("./rules/jsx-a11y"); const reactRules = require("./rules/react"); @@ -27,11 +26,7 @@ module.exports = { } }, plugins: ["react", "jsx-a11y"], - extends: [ - path.resolve(__dirname, "./esnext.js"), - "plugin:react/recommended", - "plugin:jsx-a11y/recommended" - ], + extends: ["plugin:react/recommended", "plugin:jsx-a11y/recommended"], rules: Object.assign({}, reactRules, jsxA11yRules, { "class-methods-use-this": [ "error", diff --git a/package-lock.json b/package-lock.json index 3878658..58d9919 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "eslint-plugin-itgalaxy", - "version": "90.0.0", + "version": "91.0.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index a26bdb7..929a02f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "eslint-plugin-itgalaxy", - "version": "90.0.0", + "version": "91.0.0", "description": "Itgalaxy org's ESLint rules and configs.", "keywords": [ "eslint",