Skip to content
This repository has been archived by the owner on Sep 21, 2021. It is now read-only.

Commit

Permalink
fix(config): allow for jsx in server rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
saiichihashimoto committed Feb 3, 2019
1 parent 0d10f04 commit 54dd6af
Showing 1 changed file with 73 additions and 70 deletions.
143 changes: 73 additions & 70 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/* eslint key-spacing: ['error', { beforeColon: false, afterColon: true }] */

module.exports = {
parser: 'babel-eslint',
plugins: [
'css-modules',
'import',
Expand All @@ -13,15 +12,21 @@ module.exports = {
'plugin:you-dont-need-lodash-underscore/all',
'plugin:you-dont-need-momentjs/recommended',
],
env: {
es6: true,
node: true,
parser: 'babel-eslint',
parserOptions: {
ecmaFeatures: {
jsx: true,
},
},
settings: {
react: {
version: '16.0',
version: 'detect',
},
},
env: {
es6: true,
node: true,
},
rules: {
'import/exports-last': 'error',
'import/first': [
Expand All @@ -34,6 +39,69 @@ module.exports = {
'import/no-extraneous-dependencies': 'error',
'import/order': 'error',
'import/prefer-default-export': 'off',

'jsx-a11y/anchor-has-content': 'off',
'jsx-a11y/anchor-is-valid': 'off',
'jsx-a11y/click-events-have-key-events': 'off',
'jsx-a11y/no-noninteractive-element-interactions': 'off',
'jsx-a11y/no-static-element-interactions': 'off',

'react/jsx-closing-bracket-location': [
'error',
'after-props',
],
'react/jsx-filename-extension': [
'error',
{
extensions: [
'.spec.js',
'.test.js',
'.web.js',
],
},
],
'react/jsx-handler-names': 'error',
'react/jsx-indent': [
'error',
'tab',
],
'react/jsx-indent-props': [
'error',
'tab',
],
'react/jsx-key': 'error',
'react/jsx-no-bind': 'error',
'react/jsx-one-expression-per-line': 'off',
'react/jsx-sort-props': [
'error',
{
callbacksLast: true,
noSortAlphabetically: true,
reservedFirst: true,
shorthandFirst: true,
},
],
'react/destructuring-assignment': [
'error',
'always',
{
ignoreClassFields: true,
},
],
'react/no-direct-mutation-state': 'error',
'react/no-multi-comp': 'off',
'react/no-unescaped-entities': [
'error',
{
forbid: [
'>',
'}',
],
},
],
'react/prefer-stateless-function': ['error', { ignorePureComponents: false }],
'react/prop-types': 'off',

'arrow-parens': [
'error',
'always',
Expand Down Expand Up @@ -163,11 +231,6 @@ module.exports = {
browser: true,
commonjs: true,
},
parserOptions: {
ecmaFeatures: {
jsx: true,
},
},
rules: {
'import/no-extraneous-dependencies': [
'error',
Expand All @@ -176,66 +239,6 @@ module.exports = {
optionalDependencies: false,
},
],
'jsx-a11y/anchor-has-content': 'off',
'jsx-a11y/anchor-is-valid': 'off',
'jsx-a11y/click-events-have-key-events': 'off',
'jsx-a11y/no-noninteractive-element-interactions': 'off',
'jsx-a11y/no-static-element-interactions': 'off',
'react/jsx-closing-bracket-location': [
'error',
'after-props',
],
'react/jsx-filename-extension': [
'error',
{
extensions: [
'.spec.js',
'.test.js',
'.web.js',
],
},
],
'react/jsx-handler-names': 'error',
'react/jsx-indent': [
'error',
'tab',
],
'react/jsx-indent-props': [
'error',
'tab',
],
'react/jsx-key': 'error',
'react/jsx-no-bind': 'error',
'react/jsx-one-expression-per-line': 'off',
'react/jsx-sort-props': [
'error',
{
callbacksLast: true,
noSortAlphabetically: true,
reservedFirst: true,
shorthandFirst: true,
},
],
'react/destructuring-assignment': [
'error',
'always',
{
ignoreClassFields: true,
},
],
'react/no-direct-mutation-state': 'error',
'react/no-multi-comp': 'off',
'react/no-unescaped-entities': [
'error',
{
forbid: [
'>',
'}',
],
},
],
'react/prefer-stateless-function': ['error', { ignorePureComponents: false }],
'react/prop-types': 'off',
},
},
],
Expand Down

0 comments on commit 54dd6af

Please sign in to comment.