Skip to content

Instantly share code, notes, and snippets.

@eliperelman
Last active February 7, 2018 00:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eliperelman/1b07c9be14342067458bdc5c9634803a to your computer and use it in GitHub Desktop.
Save eliperelman/1b07c9be14342067458bdc5c9634803a to your computer and use it in GitHub Desktop.
'use strict';
const HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
use: [
['@neutrinojs/airbnb', {
"eslint": {
"rules": {
"semi": ["off"],
// Restricting for..of seems pretty controversial, let's disable that.
// See https://github.com/airbnb/javascript/issues/1271
"no-restricted-syntax": ["off"],
// Allow i++ in the final clause of a for loop
"no-plusplus": ["error", { "allowForLoopAfterthoughts": true }] ,
// TODO: The following lints are probably good to have in the long run,
// but are disabled for now to get to zero lint
// All component props should have PropTypes
"react/prop-types": ["off"],
"react/no-unused-prop-types": ["off"],
"react/forbid-prop-types": ["off"],
"react/require-default-props": ["off"],
// a11y is hard. We should do it, but it needs to be thought about holistically
"jsx-a11y/no-static-element-interactions": ["off"],
"jsx-a11y/click-events-have-key-events": ["off"],
"jsx-a11y/anchor-has-content": ["off"],
"jsx-a11y/anchor-is-valid": ["off"],
// This seems to be performance-motivated
"react/prefer-stateless-function": ["off"],
// Only define one component per file
"react/no-multi-comp": ["off"],
// Don't use console.log
"no-console": ["off"],
// Prefer default exports
"import/prefer-default-export": ["off"],
}
}
}],
['@neutrinojs/jest',{
// setup script for the framework
setupTestFrameworkScriptFile: '<rootDir>/test/setupTests.js',
}],
['@neutrinojs/react', {
html: false,
}],
(neutrino) => {
neutrino.config
.plugin('html-index')
.use(HtmlWebpackPlugin, [{
title: 'My App',
foo: 'a test string to inject',
filename: 'assets/admin.html'
}]);
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment