Permalink
Browse files

Update config (babel, eslint, ...)

  • Loading branch information...
1 parent fa15edc commit cf23ccffee0e451656a748d26ef029503f10edb0 @MoOx MoOx committed Oct 29, 2015
Showing with 104 additions and 129 deletions.
  1. +0 −3 .babelrc
  2. +1 −4 .editorconfig
  3. +0 −86 .eslintrc
  4. +0 −7 .gitignore
  5. +1 −1 .nvmrc
  6. +1 −1 .travis.yml
  7. +101 −11 package.json
  8. +0 −16 scripts/__tests__.testem.yml
View
@@ -1,3 +0,0 @@
-{
- "stage": 0
-}
View
@@ -9,9 +9,6 @@ insert_final_newline = true
indent_style = space
indent_size = 2
-[*.{md,markdown}]
+[*.md]
# Allow <br/> from Markdown
trim_trailing_whitespace = false
-
-[Makefile]
-indent_style = tab
View
@@ -1,86 +0,0 @@
----
-# babel support more syntax stuff than eslint for now
-parser: babel-eslint
-
-ecmaFeatures:
- modules: true
- jsx: true
-
-env:
- es6: true
- browser: true
- node: true
-
-globals:
- __DEV__: true
- __PROD__: true
- __SERVER_PROTOCOL__: true
- __SERVER_HOSTNAME__: true
- __SERVER_PORT__: true
- __SERVER_HOST__: true
- __SERVER_URL__: true
- __LR_SERVER_PORT__: true
-
-plugins:
- - react
-
-# 0: off, 1: warning, 2: error
-rules:
- # https://github.com/eslint/eslint/issues/2545
- no-shadow: 0
-
- # max 80 chars per line
- max-len: [2, 80, 4]
-
- # 2 spaces indentation
- indent: [2, 2]
-
- # double quote to match json
- quotes: [2, "double"]
-
- # semicolons are useless
- semi: [2, "never"]
-
- # consistent whitespace after keywords
- space-after-keywords: [2, "always"]
-
- # consistent whitespace before blocks
- space-before-blocks: [2, "always"]
-
- # consistent whitespace before function paren
- space-before-function-paren: [2, "never"]
-
- # consistent whitespace in brackets
- space-in-brackets: [2, "never"]
-
- # consistent whitespace in parens
- space-in-parens: [2, "never"]
-
- # consistent whitespace in single line comments
- spaced-line-comment: [2, "always"]
-
- # single empty lines only
- no-multiple-empty-lines: [2, {"max": 1}]
-
- # one brace per line
- brace-style: [2, "stroustrup"]
-
- # trailing coma are cool for diff
- comma-dangle: [2, "always-multiline"]
-
- # enforce comma at eol (never before)
- comma-style: [2, "last"]
- no-underscore-dangle: 0
-
- # not useful rules if you are strict enough
- camelcase: 0
-
- # eslint-plugin-react rules
- react/no-multi-comp: 2
- react/prop-types: 2
- react/wrap-multilines: 2
- react/self-closing-comp: 2
- react/no-did-mount-set-state: 2
- react/no-did-update-set-state: 2
- react/jsx-uses-react: 2
- react/jsx-uses-vars: 2
View
@@ -1,13 +1,6 @@
-# things that should be in your global gitignore
-.DS_Store
-.idea/
-
# npm
node_modules
npm-debug.log
# build
dist
-
-# todo: remove me
-todo
View
@@ -1 +1 @@
-2.0.1
+4
View
@@ -2,7 +2,7 @@ sudo: false
language: node_js
node_js:
- - iojs
+ - 4
git:
# contributors task: need all commits until we cache contributions somewhere else https://github.com/putaindecode/putaindecode.fr/issues/218
View
@@ -1,17 +1,10 @@
{
+ "private": true,
"name": "putaindecode.fr",
- "version": "0.0.0",
- "license": "MIT",
- "authors": "https://github.com/putaindecode/putaindecode.fr/graphs/contributors",
"homepage": "http://putaindecode.fr",
- "repositoryHttpUrl": "http://github.com/putaindecode/putaindecode.fr",
- "repository": {
- "type": "git",
- "url": "https://github.com/putaindecode/putaindecode.fr.git"
- },
- "bugs": {
- "url": "https://github.com/putaindecode/putaindecode.fr/issues"
- },
+ "authors": "https://github.com/putaindecode/putaindecode.fr/graphs/contributors",
+ "repository": "https://github.com/putaindecode/putaindecode.fr.git",
+ "license": "MIT",
"dependencies": {
"cssrecipes-custom-media-queries": "^0.3.0",
"cssrecipes-defaults": "^0.5.0",
@@ -83,5 +76,102 @@
"test": "npm run lint && npm run tape && npm run build -- --production && npm run testem",
"_deploy": "GH_OWNER=putaindecode GH_PROJECT_NAME=putaindecode.fr ./scripts/deploy-to-gh-pages.sh -v",
"deploy": "npm test && npm run _deploy"
+ },
+ "babel": {
+ "stage": 0,
+ "env": {
+ "development": {
+ "plugins": [ "react-transform" ],
+ "extra": {
+ "react-transform": {
+ "transforms": [
+ {
+ "transform": "react-transform-hmr",
+ "imports": [ "react" ],
+ "locals": [ "module" ]
+ },
+ {
+ "transform": "react-transform-catch-errors",
+ "imports": [ "react", "redbox-react" ]
+ }
+ ]
+ }
+ }
+ }
+ }
+ },
+ "eslintConfig": {
+ "root": true,
+ "extends": "eslint:recommended",
+ "#parser": "babel-eslint support more syntax stuff than eslint for now",
+ "parser": "babel-eslint",
+ "ecmaFeatures": {
+ "jsx": true,
+ "modules": true,
+ "experimentalObjectRestSpread": true
+ },
+
+ "env": {
+ "es6": true,
+ "browser": true,
+ "node": true
+ },
+ "rules": {
+ "no-console": 0,
+ "indent": [ 2, 2 ],
+ "max-len": [ 2, 80, 4 ],
+ "no-multiple-empty-lines": [ 2, { "max": 1 } ],
+ "quotes": [ 2, "double" ],
+ "jsx-quotes": [ 2, "prefer-double" ],
+ "semi": [ 2, "never" ],
+ "comma-dangle": [ 2, "always-multiline" ],
+ "comma-style": [ 2, "last" ],
+ "brace-style": [ 2, "stroustrup" ],
+ "dot-location": [ 2, "property" ],
+ "computed-property-spacing": [ 2, "never" ],
+ "object-curly-spacing": [ 2, "always" ],
+ "array-bracket-spacing": [ 2, "always" ],
+ "space-after-keywords": [ 2, "always" ],
+ "space-before-blocks": [ 2, "always" ],
+ "space-before-function-paren": [ 2, "never" ],
+ "space-in-parens": [ 2, "never" ],
+ "space-unary-ops": [ 2, { "words": true, "nonwords": false } ],
+ "spaced-comment": [ 2, "always" ],
+
+ "one-var": [ 2, "never" ],
+ "no-var": [ 2 ],
+ "no-bitwise": [ 2 ],
+ "prefer-const": [ 2 ],
+
+ "react/jsx-closing-bracket-location": [ 2, "tag-aligned" ],
+ "react/jsx-curly-spacing": [ 2, "always" ],
+ "react/jsx-indent-props": [ 2, 2 ],
+ "react/jsx-no-duplicate-props": 2,
+ "react/jsx-no-literals": 2,
+ "react/jsx-no-undef": 2,
+ "react/jsx-uses-react": 2,
+ "react/jsx-uses-vars": 2,
+ "react/no-did-mount-set-state": 2,
+ "react/no-did-update-set-state": 2,
+ "react/no-direct-mutation-state": 2,
+ "react/no-multi-comp": 2,
+ "react/no-unknown-property": 2,
+ "react/prefer-es6-class": 2,
+ "react/prop-types": 2,
+ "react/react-in-jsx-scope": 2,
+ "react/require-extension": 2,
+ "react/self-closing-comp": 2,
+ "react/sort-comp": 2,
+ "react/wrap-multilines": 2
+ },
+ "globals": {
+ "__BASE_URL__": true,
+ "__DEV__": true,
+ "__PROD__": true,
+ "__DEVTOOLS__": true
+ },
+ "plugins": [
+ "react"
+ ]
}
}
@@ -1,16 +0,0 @@
-framework: tap
-
-serve_files: dist/__tests__.js
-
-launch_in_ci:
- - firefox
- - safari
- - chrome
- - internet explorer
- - phantomjs
-
-# if you want to debug phantomjs
-# uncomment this
-# run testem
-# then go to http://localhost:8888/
-# phantomjs_debug_port: 8888

0 comments on commit cf23ccf

Please sign in to comment.