Skip to content

Commit

Permalink
feat(import): enforce no extensions for js files (#92)
Browse files Browse the repository at this point in the history
feat(import): enforce no extensions for js files
  • Loading branch information
bobylito authored Jul 18, 2018
1 parent a0d2c2d commit b24e9b2
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions rules/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ module.exports = {
'import/no-commonjs': ['error'],
'import/no-extraneous-dependencies': ['error'],
'import/no-duplicates': ['error'],
'import/extensions': [2, 'always', { js: 'never' }],
'prettier/prettier': [
'error',
{ trailingComma: 'es5', singleQuote: true, printWidth: 80 },
Expand Down
4 changes: 2 additions & 2 deletions sample-project/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import connect from './src/connect.js';
import Provider from './src/Provider.js';
import connect from './src/connect';
import Provider from './src/Provider';

export { Provider, connect };
4 changes: 2 additions & 2 deletions sample-project/src/Provider.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Component, Children } from 'react';
import PropTypes from 'prop-types';

import createStore from './createStore.js';
import storeShape from './storeShape.js';
import createStore from './createStore';
import storeShape from './storeShape';

class Provider extends Component {
static propTypes = {
Expand Down
2 changes: 1 addition & 1 deletion sample-project/src/connect.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { Component } from 'react';
import shallowCompare from 'react-addons-shallow-compare';

import storeShape from './storeShape.js';
import storeShape from './storeShape';

const getDisplayName = WrappedComponent =>
WrappedComponent.displayName || WrappedComponent.name || 'UnknownComponent';
Expand Down

0 comments on commit b24e9b2

Please sign in to comment.