Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(import): enforce no extensions for js files #92

Merged
merged 1 commit into from Jul 18, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions rules/base.js
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
@@ -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
@@ -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
@@ -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