diff --git a/.eslintrc.yml b/.eslintrc.yml index 930bb798..468a7466 100644 --- a/.eslintrc.yml +++ b/.eslintrc.yml @@ -1,14 +1,20 @@ env: - node: true es6: true + node: true extends: - - airbnb-base + - eslint:recommended + - plugin:import/recommended - prettier parser: babel-eslint rules: + import/order: + - error + - alphabetize: + order: 'asc' + max-len: - error - 80 @@ -18,11 +24,3 @@ rules: ignoreRegExpLiterals: true ignoreStrings: true ignoreTemplateLiterals: true - - no-param-reassign: off - - no-restricted-syntax: - - error - - ForInStatement - - LabeledStatement - - WithStatement diff --git a/CHANGELOG.md b/CHANGELOG.md index 53a397a6..33cac73e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ ### Changed - Upgrade dependent packages to the latest version ([#241](https://github.com/marp-team/marpit/pull/241)) +- Use ESLint recommended config instead of `eslint-config-airbnb` ([#242](https://github.com/marp-team/marpit/pull/242)) ## v1.5.3 - 2020-05-04 diff --git a/package.json b/package.json index 31ff49b0..c960c14b 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ "docs:style": "node ./docsify/build.js", "format": "prettier \"**/*.{css,html,js,json,md,scss,ts,yaml,yml}\"", "jsdoc": "rimraf jsdoc && jsdoc src -c .jsdoc.json", - "lint:js": "eslint .", + "lint:js": "eslint --report-unused-disable-directives .", "lint:css": "stylelint \"./**/*.{css,scss}\"", "prepack": "npm-run-all --parallel check:* lint:* test:coverage --sequential build", "preversion": "run-p check:* lint:* test:coverage", @@ -75,7 +75,6 @@ "dedent": "^0.7.0", "docsify-themeable": "^0.8.1", "eslint": "^7.0.0", - "eslint-config-airbnb-base": "14.1.0", "eslint-config-prettier": "^6.11.0", "eslint-plugin-import": "^2.20.2", "jest": "^26.0.1", diff --git a/src/markdown/background_image/advanced.js b/src/markdown/background_image/advanced.js index f793e5d7..0dd80392 100644 --- a/src/markdown/background_image/advanced.js +++ b/src/markdown/background_image/advanced.js @@ -1,7 +1,7 @@ /** @module */ -import marpitPlugin from '../../plugin' import InlineStyle from '../../helpers/inline_style' import wrapTokens from '../../helpers/wrap_tokens' +import marpitPlugin from '../../plugin' /** * Marpit advanced background image plugin. diff --git a/src/markdown/comment.js b/src/markdown/comment.js index 5b3a0458..a5700634 100644 --- a/src/markdown/comment.js +++ b/src/markdown/comment.js @@ -1,6 +1,6 @@ /** @module */ -import yaml from './directives/yaml' import marpitPlugin from '../plugin' +import yaml from './directives/yaml' const commentMatcher = /