Skip to content

Commit

Permalink
Updated eslint (and other packages) and fixed linting errors.
Browse files Browse the repository at this point in the history
Linting of JSX & ES6 now working!
  • Loading branch information
badsyntax committed Mar 18, 2015
1 parent d09e473 commit 8775331
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 19 deletions.
2 changes: 1 addition & 1 deletion app/components/App/App.jsx
Expand Up @@ -31,7 +31,7 @@ export default class App extends React.Component {
return {
id: i,
label: item
}
};
})
);
}
Expand Down
2 changes: 1 addition & 1 deletion app/components/Body/Body.jsx
Expand Up @@ -48,7 +48,7 @@ class Body extends React.Component {
}
}

Body.propTypes = {
Body.propTypes = {
items: PropTypes.array.isRequired,
selectedItems: PropTypes.array.isRequired
};
Expand Down
2 changes: 1 addition & 1 deletion app/components/Menu/Menu.jsx
Expand Up @@ -28,7 +28,7 @@ class Menu extends React.Component {
}
}

Menu.propTypes = {
Menu.propTypes = {
items: PropTypes.array.isRequired,
onSelect: PropTypes.func.isRequired,
onDeselect: PropTypes.func.isRequired
Expand Down
4 changes: 2 additions & 2 deletions app/components/MenuItem/MenuItem.jsx
Expand Up @@ -16,7 +16,7 @@ class MenuItem extends React.Component {
};
}

handleClick(e) {
handleClick() {
console.log('You clicked on: %s', this.props.item.label);
this.toggleSelected();
this.props[
Expand Down Expand Up @@ -50,7 +50,7 @@ class MenuItem extends React.Component {
}
}

MenuItem.propTypes = {
MenuItem.propTypes = {
item: PropTypes.object.isRequired,
onSelect: PropTypes.func.isRequired,
onDeselect: PropTypes.func.isRequired
Expand Down
2 changes: 1 addition & 1 deletion app/components/SelectedItem/SelectedItem.jsx
Expand Up @@ -14,7 +14,7 @@ class SelectedItem extends React.Component {
}
}

SelectedItem.propTypes = {
SelectedItem.propTypes = {
item: PropTypes.object.isRequired
};

Expand Down
2 changes: 1 addition & 1 deletion app/components/SelectedList/SelectedList.jsx
Expand Up @@ -21,7 +21,7 @@ class SelectedList extends React.Component {
}
}

SelectedList.propTypes = {
SelectedList.propTypes = {
items: PropTypes.array.isRequired
};

Expand Down
29 changes: 17 additions & 12 deletions package.json
Expand Up @@ -11,39 +11,40 @@
"prerelease": "npm test",
"prestart": "npm install",
"prewebpack": "npm run clean",
"pretest": "npm run lint",
"clean": "rm -rf $npm_package_config_build_dir && mkdir $npm_package_config_build_dir",
"start": "NODE_ENV=development npm run webpack && npm run start-dev-server",
"webpack": "webpack --colors --progress --config ./webpack.config.js",
"start-dev-server": "webpack-dev-server --colors --port $npm_package_config_dev_port --content-base $npm_package_config_build_dir --config webpack.config.js --output-pathinfo --inline",
"build": "NODE_ENV=production npm run webpack",
"lint": "eslint ./app",
"lint": "eslint --ext .js --ext .jsx ./app && echo No linting errors.",
"test": "jest"
},
"dependencies": {
"classnames": "^1.1.4",
"classnames": "^1.2.0",
"flux": "^2.0.1",
"normalize.css": "^3.0.2",
"react": "^0.13.0"
"react": "^0.13.1"
},
"devDependencies": {
"autoprefixer-core": "^5.1.7",
"babel-core": "^4.7.8",
"babel-eslint": "^2.0.0",
"babel-core": "^4.7.16",
"babel-eslint": "^2.0.2",
"babel-jest": "^4.0.0",
"babel-loader": "^4.1.0",
"babel-runtime": "^4.7.8",
"babel-loader": "^4.2.0",
"babel-runtime": "^4.7.16",
"css-loader": "^0.9.1",
"eslint": "^0.16.2",
"eslint": "^0.17.1",
"extract-text-webpack-plugin": "^0.3.8",
"file-loader": "^0.8.1",
"html-loader": "^0.2.3",
"jest-cli": "^0.4.0",
"lodash": "^3.5.0",
"postcss-loader": "^0.3.0",
"sass-loader": "^0.4.2",
"sass-loader": "^0.5.0",
"style-loader": "^0.8.3",
"template-html-loader": "0.0.3",
"webpack": "^1.7.2",
"webpack": "^1.7.3",
"webpack-dev-server": "^1.7.0"
},
"jest": {
Expand All @@ -67,10 +68,14 @@
"node": ">=0.10.0"
},
"eslintConfig": {
"parser": "babel-eslint",
"env": {
"browser": true,
"node": true
"node": true,
"es6": true
},
"ecmaFeatures": {
"modules": true,
"jsx": true
},
"globals": {
"jest": true,
Expand Down

0 comments on commit 8775331

Please sign in to comment.