Skip to content

Commit

Permalink
config tools
Browse files Browse the repository at this point in the history
  • Loading branch information
rosko committed Apr 5, 2016
1 parent 1cfa1bd commit fb9bf52
Show file tree
Hide file tree
Showing 7 changed files with 110 additions and 75 deletions.
8 changes: 6 additions & 2 deletions .babelrc
@@ -1,4 +1,8 @@
{
"presets": ["es2015"],
"plugins": ["transform-react-jsx"]
"presets": [
"es2015"
],
"plugins": [
"transform-react-jsx"
]
}
18 changes: 18 additions & 0 deletions .editorconfig
@@ -0,0 +1,18 @@
# http://editorconfig.org
root = true

[*.js]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[*.{json,yml,md,babelrc,eslintrc}]
indent_style = space
indent_size = 2

[*.md]
max_line_length = 0
trim_trailing_whitespace = false
134 changes: 67 additions & 67 deletions .eslintrc
@@ -1,72 +1,72 @@
{
"env": {
"browser": true,
"commonjs": true,
"es6": true,
"jasmine": true
"env": {
"browser": true,
"commonjs": true,
"es6": true,
"jasmine": true
},
"extends": [
"eslint:recommended",
"plugin:react/recommended"
],
"globals": {
"jest": true
},
"parserOptions": {
"ecmaFeatures": {
"experimentalObjectRestSpread": true,
"jsx": true
},
"extends": [
"eslint:recommended",
"plugin:react/recommended"
"sourceType": "module"
},
"plugins": [
"react"
],
"rules": {
"indent": [
"error",
4
],
"globals": {
"jest": true
},
"parserOptions": {
"ecmaFeatures": {
"experimentalObjectRestSpread": true,
"jsx": true
},
"sourceType": "module"
},
"plugins": [
"react"
"linebreak-style": [
"error",
"unix"
],
"quotes": [
"error",
"single"
],
"semi": [
"error",
"always"
],
"no-console": [
"error",
{
"allow": [
"warn",
"error"
]
}
],
"no-multiple-empty-lines": [
"error",
{
"max": 2,
"maxEOF": 1,
"maxBOF": 0
}
],
"no-trailing-spaces": [
"error"
],
"eol-last": [
"error"
],
"jsx-quotes": [
"error",
"prefer-single"
],
"rules": {
"indent": [
"error",
4
],
"linebreak-style": [
"error",
"unix"
],
"quotes": [
"error",
"single"
],
"semi": [
"error",
"always"
],
"no-console": [
"error",
{
"allow": [
"warn",
"error"
]
}
],
"no-multiple-empty-lines": [
"error",
{
"max": 2,
"maxEOF": 1,
"maxBOF": 0
}
],
"no-trailing-spaces": [
"error"
],
"eol-last": [
"error"
],
"jsx-quotes": [
"error",
"prefer-single"
],
"react/react-in-jsx-scope": "off",
"react/prefer-stateless-function": "error"
}
"react/react-in-jsx-scope": "off",
"react/prefer-stateless-function": "error"
}
}
12 changes: 11 additions & 1 deletion .npmignore
Expand Up @@ -65,4 +65,14 @@ test-dist
*.apk
.DS_Store

src/*
src/*
tests/*

.babelrc
.editorconfig
.eslintignore
.eslintrc
.gitignore
.npmignore
.nvmrc
npm-debug.log
5 changes: 2 additions & 3 deletions package.json
Expand Up @@ -5,9 +5,8 @@
"main": "lib/index.js",
"scripts": {
"build": "./node_modules/.bin/babel src --out-dir lib",
"start": "./node_modules/.bin/babel --watch src --out-dir lib",
"test": "./node_modules/.bin/jest",
"watch": "./node_modules/.bin/jest --watch",
"test": "npm run build && ./node_modules/.bin/jest",
"start": "./node_modules/.bin/babel --watch src --out-dir lib & ./node_modules/.bin/jest --watch",
"publish-patch": "npm run build && npm version patch && npm publish",
"publish-minor": "npm run build && npm version minor && npm publish",
"publish-major": "npm run build && npm version major && npm publish"
Expand Down
6 changes: 5 additions & 1 deletion src/Title.js
Expand Up @@ -16,7 +16,11 @@ const Title = React.createClass({
height: React.PropTypes.oneOfType([React.PropTypes.number, React.PropTypes.string]),
position: React.PropTypes.oneOfType([React.PropTypes.array, React.PropTypes.string]),

children: React.PropTypes.oneOfType([React.PropTypes.func, React.PropTypes.string, React.PropTypes.node]).isRequired,
children: React.PropTypes.oneOfType([
React.PropTypes.func,
React.PropTypes.string,
React.PropTypes.node
]).isRequired,
layerWidth: React.PropTypes.oneOfType([React.PropTypes.number, React.PropTypes.string]),
layerHeight: React.PropTypes.oneOfType([React.PropTypes.number, React.PropTypes.string]),
series: React.PropTypes.array
Expand Down
2 changes: 1 addition & 1 deletion tests/components/Title_spec.js
@@ -1,7 +1,7 @@
'use strict';

const {shallow} = require('enzyme');
const Title = require('../../src/Title');
const Title = require('../../lib/Title');

describe('Title', () => {

Expand Down

0 comments on commit fb9bf52

Please sign in to comment.