From b8db8e1b45b35878864c8fc882296991ffd3ee2c Mon Sep 17 00:00:00 2001 From: Atif Afzal Date: Mon, 19 Dec 2016 19:50:18 +0530 Subject: [PATCH] Add linting for CSS class names (#1026) --- package.json | 9 ++++++++- src/components/Footer/Footer.css | 5 ----- src/routes/home/Home.js | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 5cdd1e4d2..f0d87cf7c 100644 --- a/package.json +++ b/package.json @@ -61,6 +61,7 @@ "eslint": "^3.10.2", "eslint-config-airbnb": "^13.0.0", "eslint-loader": "^1.6.1", + "eslint-plugin-css-modules": "^1.0.9", "eslint-plugin-import": "^2.2.0", "eslint-plugin-jsx-a11y": "^2.2.3", "eslint-plugin-react": "^6.7.1", @@ -128,7 +129,13 @@ }, "eslintConfig": { "parser": "babel-eslint", - "extends": "airbnb", + "extends": [ + "airbnb", + "plugin:css-modules/recommended" + ], + "plugins": [ + "css-modules" + ], "globals": { "__DEV__": true }, diff --git a/src/components/Footer/Footer.css b/src/components/Footer/Footer.css index cc4270a85..a34e74e76 100644 --- a/src/components/Footer/Footer.css +++ b/src/components/Footer/Footer.css @@ -25,11 +25,6 @@ color: rgba(255, 255, 255, 0.5); } -.textMuted { - composes: text; - color: rgba(255, 255, 255, 0.3); -} - .spacer { color: rgba(255, 255, 255, 0.3); } diff --git a/src/routes/home/Home.js b/src/routes/home/Home.js index 11a11da0b..ff831a811 100644 --- a/src/routes/home/Home.js +++ b/src/routes/home/Home.js @@ -24,7 +24,7 @@ class Home extends React.Component { return (
-

React.js News

+

React.js News

    {this.props.news.map((item, index) => (