diff --git a/.eslintrc.json b/.eslintrc.json
new file mode 100644
index 0000000..99f7c65
--- /dev/null
+++ b/.eslintrc.json
@@ -0,0 +1,8 @@
+{
+ "extends": "airbnb",
+ "plugins": [
+ "react",
+ "jsx-a11y",
+ "import"
+ ]
+}
\ No newline at end of file
diff --git a/package.json b/package.json
index 4acd9c1..edcaf46 100644
--- a/package.json
+++ b/package.json
@@ -23,6 +23,11 @@
"babel-preset-stage-1": "^6.24.1",
"babel-runtime": "^6.0.0",
"css-loader": "^0.18.0",
+ "eslint": "^4.9.0",
+ "eslint-config-airbnb": "^16.1.0",
+ "eslint-plugin-import": "^2.7.0",
+ "eslint-plugin-jsx-a11y": "^6.0.2",
+ "eslint-plugin-react": "^7.4.0",
"extract-text-webpack-plugin": "^0.8.2",
"file-loader": "^0.8.4",
"flow-bin": "^0.56.0",
@@ -35,7 +40,8 @@
"webpack": "^1.12.0"
},
"scripts": {
- "test": "echo \"Error: no test specified\" && exit 1"
+ "test": "echo \"Error: no test specified\" && exit 1",
+ "lint": "eslint ./src"
},
"repository": {
"type": "git",
diff --git a/src/__tests__/Icon-test.js b/src/__tests__/Icon-test.js
index b3f638a..063fbef 100644
--- a/src/__tests__/Icon-test.js
+++ b/src/__tests__/Icon-test.js
@@ -3,62 +3,62 @@
*/
import React from 'react';
-import {renderToString} from 'react-dom/server';
+import { renderToString } from 'react-dom/server';
import Icon from '../Icon';
-describe('Icon', function() {
- it('renders Font Awesome className', function() {
- let markup = renderToString();
+describe('Icon', function () {
+ it('renders Font Awesome className', function () {
+ const markup = renderToString();
expect(/);
+ it('supports "size"', function () {
+ const markup = renderToString();
expect(/);
+ it('supports "rotate"', function () {
+ const markup = renderToString();
expect(/);
+ it('supports "flip"', function () {
+ const markup = renderToString();
expect(/);
+ it('supports "fixedWidth"', function () {
+ const markup = renderToString();
expect(/);
+ it('supports "spin"', function () {
+ const markup = renderToString();
expect(/);
+ it('supports "pulse"', function () {
+ const markup = renderToString();
expect(/);
+ it('supports "stack"', function () {
+ const markup = renderToString();
expect(/);
+ it('supports "inverse"', function () {
+ const markup = renderToString();
expect(/);
+ it('supports custom className', function () {
+ const markup = renderToString();
expect(/);
+ it('can be rendered using different DOM component', function () {
+ const markup = renderToString();
expect(/
,
@@ -17,8 +17,8 @@ describe('IconStack', function() {
expect(/
,
@@ -26,8 +26,8 @@ describe('IconStack', function() {
expect(/
,
diff --git a/src/index.js b/src/index.js
index 4a06b51..78c9d52 100644
--- a/src/index.js
+++ b/src/index.js
@@ -8,4 +8,4 @@ import 'font-awesome/css/font-awesome.css';
import Icon from './Icon';
import IconStack from './IconStack';
-export {Icon as default, Icon, IconStack};
+export { Icon as default, Icon, IconStack };