From fc1930ef77c3ba05f81e32fc5f7cd28c21185e69 Mon Sep 17 00:00:00 2001 From: Mark Larah Date: Sun, 22 Apr 2018 10:22:49 -0700 Subject: [PATCH] Enable new eslint rules - Enable import/order (https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/order.md) - Use ES2018 parser and remove old config options (https://eslint.org/docs/user-guide/configuring#deprecated) --- .gitignore | 1 + index.js | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index f846c68..39a59af 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ node_modules package-lock.json +yarn-error.log yarn.lock diff --git a/index.js b/index.js index 7114b6b..6706109 100644 --- a/index.js +++ b/index.js @@ -9,17 +9,17 @@ module.exports = { plugins: ['flowtype', 'prettier'], parser: 'babel-eslint', parserOptions: { - ecmaVersion: 2017, + ecmaVersion: 2018, sourceType: 'module', ecmaFeatures: { jsx: true, - experimentalObjectRestSpread: true, }, }, env: { es6: true, }, rules: { + 'import/order': 2, 'react/jsx-filename-extension': 'off', 'prettier/prettier': [ 'error',