Skip to content

Commit

Permalink
Add pre-commit hook to eslint javascript code; import nes.min.css glo…
Browse files Browse the repository at this point in the history
…baly in stories;
  • Loading branch information
abdallahalsamman committed Dec 4, 2018
1 parent ee343da commit 81d6c43
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"extends": "airbnb-base"
}
}
2 changes: 2 additions & 0 deletions .storybook/config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { configure } from '@storybook/html';

import '../css/nes.min.css'

// automatically import all files ending in *.stories.js
const req = require.context('../docs', true, /.stories.js$/);
function loadStories() {
Expand Down
4 changes: 1 addition & 3 deletions docs/balloons.stories.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import { storiesOf } from '@storybook/html';

import '../css/nes.css';
import { storiesOf } from '@storybook/html'; // eslint-disable-line import/no-extraneous-dependencies

storiesOf('Balloons', module)
.add('.balloon.from-left', () => '<div class="balloon from-left"> <p>Hello NES.css</p> </div>')
Expand Down
4 changes: 1 addition & 3 deletions docs/buttons.stories.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import { storiesOf } from '@storybook/html';

import '../css/nes.css';
import { storiesOf } from '@storybook/html'; // eslint-disable-line import/no-extraneous-dependencies

storiesOf('Buttons', module)
.add('button.btn', () => ' <button type="button" class="btn">Normal</button>')
Expand Down
4 changes: 1 addition & 3 deletions docs/containers.stories.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import { storiesOf } from '@storybook/html';

import '../css/nes.css';
import { storiesOf } from '@storybook/html'; // eslint-disable-line import/no-extraneous-dependencies

storiesOf('Containers', module)
.add('.container.with-title', () => `<div class="container with-title">
Expand Down
4 changes: 1 addition & 3 deletions docs/icons.stories.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import { storiesOf } from '@storybook/html';

import '../css/nes.css';
import { storiesOf } from '@storybook/html'; // eslint-disable-line import/no-extraneous-dependencies

storiesOf('Icons', module)
.add('icon.twitter', () => '<i class="icon twitter"></i>')
Expand Down
4 changes: 1 addition & 3 deletions docs/inputs.stories.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import { storiesOf } from '@storybook/html';

import '../css/nes.css';
import { storiesOf } from '@storybook/html'; // eslint-disable-line import/no-extraneous-dependencies

storiesOf('Inputs', module)
.add('input.radio', () => `
Expand Down
4 changes: 1 addition & 3 deletions docs/table.stories.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import { storiesOf } from '@storybook/html';

import '../css/nes.css';
import { storiesOf } from '@storybook/html'; // eslint-disable-line import/no-extraneous-dependencies

storiesOf('Tables', module)
.add('table.table', () => `
Expand Down
7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"homepage": "https://github.com/BcRikko/NES.css#readme",
"devDependencies": {
"@storybook/html": "^4.0.11",
"babel-loader": "^8.0.4",
"autoprefixer": "^9.1.5",
"clean-css-cli": "^4.2.1",
"eslint": "^5.9.0",
Expand Down Expand Up @@ -64,7 +65,8 @@
"npm run build",
"git add ./css",
"git add"
]
],
"*.js": ["eslint .", "git add"]
},
"prettier": {
"printWidth": 100
Expand All @@ -85,8 +87,5 @@
"at-rule-no-unknown": null,
"scss/at-rule-no-unknown": true
}
},
"dependencies": {
"babel-loader": "^8.0.4"
}
}

0 comments on commit 81d6c43

Please sign in to comment.