Permalink
Browse files

Fix eslint (#4897)

* Fix eslint call

* Fix linting errors
  • Loading branch information...
1 parent 53de56d commit 1d9e509df21e9e4c2e28855d11a50cfb0010ece8 @danez danez committed with hzoo Nov 26, 2016
View
@@ -1,9 +1,11 @@
-packages/babel-core/src/transformation/templates
+/lib
scripts
-lib
+packages/babel-core/src/transformation/templates
packages/babel-runtime
packages/*/node_modules
+packages/*/lib
packages/*/dist
+packages/*/test/fixtures
vendor
_babel.github.io
Gulpfile.js
View
@@ -18,13 +18,13 @@ watch: clean
./node_modules/.bin/gulp watch
lint:
- ./node_modules/.bin/eslint packages/*/{src,test}/*.js --format=codeframe
+ ./node_modules/.bin/eslint packages/ --format=codeframe
flow:
./node_modules/.bin/flow check
fix:
- ./node_modules/.bin/eslint packages/*/{src,test}/*.js --format=codeframe --fix
+ ./node_modules/.bin/eslint packages/ --format=codeframe --fix
clean: test-clean
rm -rf packages/*/lib
@@ -182,7 +182,7 @@ export default class OptionManager {
this.log.error(`Using removed Babel 5 option: ${alias}.${key} - ${removed[key].message}`, ReferenceError);
} else {
let unknownOptErr = `Unknown option: ${alias}.${key}. Check out http://babeljs.io/docs/usage/options/ for more information about options.`;
- let presetConfigErr = `A common cause of this error is the presence of a configuration options object without the corresponding preset name. Example:\n\nInvalid:\n \`{ presets: [{option: value}] }\`\nValid:\n \`{ presets: [['presetName', {option: value}]] }\`\n\nFor more detailed information on preset configuration, please see http://babeljs.io/docs/plugins/#pluginpresets-options.`;
+ let presetConfigErr = "A common cause of this error is the presence of a configuration options object without the corresponding preset name. Example:\n\nInvalid:\n `{ presets: [{option: value}] }`\nValid:\n `{ presets: [['presetName', {option: value}]] }`\n\nFor more detailed information on preset configuration, please see http://babeljs.io/docs/plugins/#pluginpresets-options.";
this.log.error(`${unknownOptErr}\n\n${presetConfigErr}`, ReferenceError);
}
@@ -68,11 +68,11 @@ export let hooks = [
function (self, parent) {
if (
- (parent.isIfStatement() && (self.key === 'consequent' || self.key === 'alternate')) ||
- (parent.isLoop() && self.key === 'body')
+ (parent.isIfStatement() && (self.key === "consequent" || self.key === "alternate")) ||
+ (parent.isLoop() && self.key === "body")
) {
self.replaceWith({
- type: 'BlockStatement',
+ type: "BlockStatement",
body: []
});
return true;
@@ -42,7 +42,7 @@ export default class Renamer {
let isDefault = exportDeclar.isExportDefaultDeclaration();
if (isDefault && (parentDeclar.isFunctionDeclaration() ||
- parentDeclar.isClassDeclaration())&& !parentDeclar.node.id) {
+ parentDeclar.isClassDeclaration()) && !parentDeclar.node.id) {
// Ensure that default class and function exports have a name so they have a identifier to
// reference from the export specifier list.
parentDeclar.node.id = parentDeclar.scope.generateUidIdentifier("default");

0 comments on commit 1d9e509

Please sign in to comment.