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

add eslint-plugin-import #109

Merged
merged 1 commit into from
Jun 15, 2016
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions cli.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#!/usr/bin/env node
/* eslint-disable import-order/import-order */
/* eslint-disable import/order */
'use strict';

var debug = require('debug')('xo');

// Prefer the local installation of XO.
var resolveCwd = require('resolve-cwd');
var hasFlag = require('has-flag');

var localCLI = resolveCwd('xo/cli');

if (!hasFlag('no-local') && localCLI && localCLI !== __filename) {
Expand All @@ -15,11 +15,11 @@ if (!hasFlag('no-local') && localCLI && localCLI !== __filename) {
return;
}

var path = require('path');
var spawn = require('child_process').spawn;
var updateNotifier = require('update-notifier');
var getStdin = require('get-stdin');
var spawn = require('child_process').spawn;
var meow = require('meow');
var path = require('path');
var formatterPretty = require('eslint-formatter-pretty');
var xo = require('./');

Expand Down
32 changes: 28 additions & 4 deletions config/plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,42 @@
module.exports = {
plugins: [
'no-use-extend-native',
'import-order',
'ava',
'xo',
'promise'
'promise',
'import'
],
extends: [
'plugin:ava/recommended',
'plugin:xo/recommended'
],
settings: {
'import/extensions': ['.js'] // TODO: remove this when eslint-plugin-import@2 is out
},
rules: {
'no-use-extend-native/no-use-extend-native': 2,
'import-order/import-order': 2,
'promise/param-names': 2
'promise/param-names': 2,
// disabled because of https://github.com/benmosher/eslint-plugin-import/issues/268
// 'import/default': 2,
'import/export': 2,
// disabled because of https://github.com/benmosher/eslint-plugin-import/issues/378
// 'import/extensions': [2, 'never'],
'import/imports-first': 2,
// disabled because of https://github.com/benmosher/eslint-plugin-import/issues/268
// 'import/named': 2,
'import/namespace': 2,
'import/newline-after-import': 2,
'import/no-amd': 2,
// enable this sometime in the future when Node.js has ES2015 module support
// 'import/no-commonjs': 2,
// looks useful, but too unstable at the moment
// 'import/no-deprecated': 2,
'import/no-extraneous-dependencies': 2,
'import/no-mutable-exports': 2,
'import/no-named-as-default-member': 2,
'import/no-named-as-default': 2,
// disabled because of https://github.com/benmosher/eslint-plugin-import/issues/275
// 'import/no-unresolved': [2, {commonjs: true}],
'import/order': 2
}
};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"eslint-formatter-pretty": "^0.2.1",
"eslint-plugin-ava": "^2.0.0",
"eslint-plugin-babel": "^3.1.0",
"eslint-plugin-import-order": "^2.0.0",
"eslint-plugin-import": "^1.7.0",
"eslint-plugin-no-use-extend-native": "^0.3.2",
"eslint-plugin-promise": "^1.1.0",
"eslint-plugin-xo": "^0.5.0",
Expand Down
5 changes: 4 additions & 1 deletion test/fixtures/overrides/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
"files": "test/foo.js",
"space": 4
}
]
],
"rules": {
"import/no-extraneous-dependencies": 0
}
}
}