From 4def56f9c98b7422a4386aa678111e40051b7bad Mon Sep 17 00:00:00 2001 From: Sam Desborough Date: Tue, 19 May 2015 17:56:05 +0100 Subject: [PATCH 01/18] initial readme updates --- README.md | 125 ++++++++---------------------------------------------- 1 file changed, 18 insertions(+), 107 deletions(-) diff --git a/README.md b/README.md index 5a11988c6f..0c5682b0f4 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,7 @@ -[![Gitter](https://badges.gitter.im/Join Chat.svg)](https://gitter.im/airbnb/javascript?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) - -# Airbnb JavaScript Style Guide() { +# pebble {code} JavaScript Style Guide() { *A mostly reasonable approach to JavaScript* -[For the ES5-only guide click here](es5/). - ## Table of Contents 1. [Types](#types) @@ -140,7 +136,7 @@ const item = {}; ``` - - [3.2](#3.2) Don't use [reserved words](http://es5.github.io/#x7.6.1) as keys. It won't work in IE8. [More info](https://github.com/airbnb/javascript/issues/61). + - [3.2](#3.2) Don't use [reserved words](http://es5.github.io/#x7.6.1) as keys. It won't work in IE8. [More info](https://github.com/pebble {code}/javascript/issues/61). ```javascript // bad @@ -404,7 +400,7 @@ ``` - [6.2](#6.2) Strings longer than 80 characters should be written across multiple lines using string concatenation. - - [6.3](#6.3) Note: If overused, long strings with concatenation could impact performance. [jsPerf](http://jsperf.com/ya-string-concat) & [Discussion](https://github.com/airbnb/javascript/issues/40). + - [6.3](#6.3) Note: If overused, long strings with concatenation could impact performance. [jsPerf](http://jsperf.com/ya-string-concat) & [Discussion](https://github.com/pebble {code}/javascript/issues/40). ```javascript // bad @@ -729,15 +725,15 @@ ```javascript // bad - const AirbnbStyleGuide = require('./AirbnbStyleGuide'); - module.exports = AirbnbStyleGuide.es6; + const pebble {code}StyleGuide = require('./pebble {code}StyleGuide'); + module.exports = pebble {code}StyleGuide.es6; // ok - import AirbnbStyleGuide from './AirbnbStyleGuide'; - export default AirbnbStyleGuide.es6; + import pebble {code}StyleGuide from './pebble {code}StyleGuide'; + export default pebble {code}StyleGuide.es6; // best - import { es6 } from './AirbnbStyleGuide'; + import { es6 } from './pebble {code}StyleGuide'; export default es6; ``` @@ -747,10 +743,10 @@ ```javascript // bad - import * as AirbnbStyleGuide from './AirbnbStyleGuide'; + import * as pebble {code}StyleGuide from './pebble {code}StyleGuide'; // good - import AirbnbStyleGuide from './AirbnbStyleGuide'; + import pebble {code}StyleGuide from './pebble {code}StyleGuide'; ``` - [10.3](#10.3) And do not export directly from an import. @@ -760,11 +756,11 @@ ```javascript // bad // filename es6.js - export { es6 as default } from './airbnbStyleGuide'; + export { es6 as default } from './pebble {code}StyleGuide'; // good // filename es6.js - import { es6 } from './AirbnbStyleGuide'; + import { es6 } from './pebble {code}StyleGuide'; export default es6; ``` @@ -1582,7 +1578,7 @@ const val = inputValue >> 0; ``` - - [21.5](#21.5) **Note:** Be careful when using bitshift operations. Numbers are represented as [64-bit values](http://es5.github.io/#x4.3.19), but Bitshift operations always return a 32-bit integer ([source](http://es5.github.io/#x11.7)). Bitshift can lead to unexpected behavior for integer values larger than 32 bits. [Discussion](https://github.com/airbnb/javascript/issues/109). Largest signed 32-bit Int is 2,147,483,647: + - [21.5](#21.5) **Note:** Be careful when using bitshift operations. Numbers are represented as [64-bit values](http://es5.github.io/#x4.3.19), but Bitshift operations always return a 32-bit integer ([source](http://es5.github.io/#x11.7)). Bitshift can lead to unexpected behavior for integer values larger than 32 bits. [Discussion](https://github.com/pebble {code}/javascript/issues/109). Largest signed 32-bit Int is 2,147,483,647: ```javascript 2147483647 >> 0 //=> 2147483647 @@ -1730,12 +1726,12 @@ - [22.8](#22.8) Use PascalCase when you export a singleton / function library / bare object. ```javascript - const AirbnbStyleGuide = { + const pebble {code}StyleGuide = { es6: { } }; - export default AirbnbStyleGuide; + export default pebble {code}StyleGuide; ``` @@ -1959,8 +1955,8 @@ **Tools** - Code Style Linters - + [JSHint](http://www.jshint.com/) - [Airbnb Style .jshintrc](https://github.com/airbnb/javascript/blob/master/linters/jshintrc) - + [JSCS](https://github.com/jscs-dev/node-jscs) - [Airbnb Style Preset](https://github.com/jscs-dev/node-jscs/blob/master/presets/airbnb.json) + + [JSHint](http://www.jshint.com/) - [pebble {code} Style .jshintrc](https://github.com/pebble {code}/javascript/blob/master/linters/jshintrc) + + [JSCS](https://github.com/jscs-dev/node-jscs) - [pebble {code} Style Preset](https://github.com/jscs-dev/node-jscs/blob/master/presets/pebble {code}.json) **Other Styleguides** @@ -1971,7 +1967,7 @@ **Other Styles** - [Naming this in nested functions](https://gist.github.com/4135065) - Christian Johansen - - [Conditional Callbacks](https://github.com/airbnb/javascript/issues/52) - Ross Allen + - [Conditional Callbacks](https://github.com/pebble {code}/javascript/issues/52) - Ross Allen - [Popular JavaScript Coding Conventions on Github](http://sideeffect.kr/popularconvention/#javascript) - JeongHoon Byun - [Multiple var statements in JavaScript, not superfluous](http://benalman.com/news/2012/05/multiple-var-statements-javascript/) - Ben Alman @@ -2021,91 +2017,6 @@ **[⬆ back to top](#table-of-contents)** -## In the Wild - - This is a list of organizations that are using this style guide. Send us a pull request or open an issue and we'll add you to the list. - - - **Aan Zee**: [AanZee/javascript](https://github.com/AanZee/javascript) - - **Adult Swim**: [adult-swim/javascript](https://github.com/adult-swim/javascript) - - **Airbnb**: [airbnb/javascript](https://github.com/airbnb/javascript) - - **American Insitutes for Research**: [AIRAST/javascript](https://github.com/AIRAST/javascript) - - **Apartmint**: [apartmint/javascript](https://github.com/apartmint/javascript) - - **Avalara**: [avalara/javascript](https://github.com/avalara/javascript) - - **Billabong**: [billabong/javascript](https://github.com/billabong/javascript) - - **Compass Learning**: [compasslearning/javascript-style-guide](https://github.com/compasslearning/javascript-style-guide) - - **DailyMotion**: [dailymotion/javascript](https://github.com/dailymotion/javascript) - - **Digitpaint** [digitpaint/javascript](https://github.com/digitpaint/javascript) - - **Evernote**: [evernote/javascript-style-guide](https://github.com/evernote/javascript-style-guide) - - **ExactTarget**: [ExactTarget/javascript](https://github.com/ExactTarget/javascript) - - **Flexberry**: [Flexberry/javascript-style-guide](https://github.com/Flexberry/javascript-style-guide) - - **Gawker Media**: [gawkermedia/javascript](https://github.com/gawkermedia/javascript) - - **GeneralElectric**: [GeneralElectric/javascript](https://github.com/GeneralElectric/javascript) - - **GoodData**: [gooddata/gdc-js-style](https://github.com/gooddata/gdc-js-style) - - **Grooveshark**: [grooveshark/javascript](https://github.com/grooveshark/javascript) - - **How About We**: [howaboutwe/javascript](https://github.com/howaboutwe/javascript) - - **InfoJobs**: [InfoJobs/JavaScript-Style-Guide](https://github.com/InfoJobs/JavaScript-Style-Guide) - - **Intent Media**: [intentmedia/javascript](https://github.com/intentmedia/javascript) - - **Jam3**: [Jam3/Javascript-Code-Conventions](https://github.com/Jam3/Javascript-Code-Conventions) - - **JSSolutions**: [JSSolutions/javascript](https://github.com/JSSolutions/javascript) - - **Kinetica Solutions**: [kinetica/javascript](https://github.com/kinetica/javascript) - - **Mighty Spring**: [mightyspring/javascript](https://github.com/mightyspring/javascript) - - **MinnPost**: [MinnPost/javascript](https://github.com/MinnPost/javascript) - - **ModCloth**: [modcloth/javascript](https://github.com/modcloth/javascript) - - **Money Advice Service**: [moneyadviceservice/javascript](https://github.com/moneyadviceservice/javascript) - - **Muber**: [muber/javascript](https://github.com/muber/javascript) - - **National Geographic**: [natgeo/javascript](https://github.com/natgeo/javascript) - - **National Park Service**: [nationalparkservice/javascript](https://github.com/nationalparkservice/javascript) - - **Nimbl3**: [nimbl3/javascript](https://github.com/nimbl3/javascript) - - **Orion Health**: [orionhealth/javascript](https://github.com/orionhealth/javascript) - - **Peerby**: [Peerby/javascript](https://github.com/Peerby/javascript) - - **Razorfish**: [razorfish/javascript-style-guide](https://github.com/razorfish/javascript-style-guide) - - **reddit**: [reddit/styleguide/javascript](https://github.com/reddit/styleguide/tree/master/javascript) - - **REI**: [reidev/js-style-guide](https://github.com/reidev/js-style-guide) - - **Ripple**: [ripple/javascript-style-guide](https://github.com/ripple/javascript-style-guide) - - **SeekingAlpha**: [seekingalpha/javascript-style-guide](https://github.com/seekingalpha/javascript-style-guide) - - **Shutterfly**: [shutterfly/javascript](https://github.com/shutterfly/javascript) - - **StudentSphere**: [studentsphere/javascript](https://github.com/studentsphere/javascript) - - **Target**: [target/javascript](https://github.com/target/javascript) - - **TheLadders**: [TheLadders/javascript](https://github.com/TheLadders/javascript) - - **T4R Technology**: [T4R-Technology/javascript](https://github.com/T4R-Technology/javascript) - - **Userify**: [userify/javascript](https://github.com/userify/javascript) - - **VoxFeed**: [VoxFeed/javascript-style-guide](https://github.com/VoxFeed/javascript-style-guide) - - **Weggo**: [Weggo/javascript](https://github.com/Weggo/javascript) - - **Zillow**: [zillow/javascript](https://github.com/zillow/javascript) - - **ZocDoc**: [ZocDoc/javascript](https://github.com/ZocDoc/javascript) - -## Translation - - This style guide is also available in other languages: - - - ![br](https://raw.githubusercontent.com/gosquared/flags/master/flags/flags/shiny/24/Brazil.png) **Brazilian Portuguese**: [armoucar/javascript-style-guide](https://github.com/armoucar/javascript-style-guide) - - ![bg](https://raw.githubusercontent.com/gosquared/flags/master/flags/flags/shiny/24/Bulgaria.png) **Bulgarian**: [borislavvv/javascript](https://github.com/borislavvv/javascript) - - ![ca](https://raw.githubusercontent.com/fpmweb/javascript-style-guide/master/img/catala.png) **Catalan**: [fpmweb/javascript-style-guide](https://github.com/fpmweb/javascript-style-guide) - - ![tw](https://raw.githubusercontent.com/gosquared/flags/master/flags/flags/shiny/24/Taiwan.png) **Chinese(Traditional)**: [jigsawye/javascript](https://github.com/jigsawye/javascript) - - ![cn](https://raw.githubusercontent.com/gosquared/flags/master/flags/flags/shiny/24/China.png) **Chinese(Simplified)**: [adamlu/javascript-style-guide](https://github.com/adamlu/javascript-style-guide) - - ![fr](https://raw.githubusercontent.com/gosquared/flags/master/flags/flags/shiny/24/France.png) **French**: [nmussy/javascript-style-guide](https://github.com/nmussy/javascript-style-guide) - - ![de](https://raw.githubusercontent.com/gosquared/flags/master/flags/flags/shiny/24/Germany.png) **German**: [timofurrer/javascript-style-guide](https://github.com/timofurrer/javascript-style-guide) - - ![it](https://raw.githubusercontent.com/gosquared/flags/master/flags/flags/shiny/24/Italy.png) **Italian**: [sinkswim/javascript-style-guide](https://github.com/sinkswim/javascript-style-guide) - - ![jp](https://raw.githubusercontent.com/gosquared/flags/master/flags/flags/shiny/24/Japan.png) **Japanese**: [mitsuruog/javacript-style-guide](https://github.com/mitsuruog/javacript-style-guide) - - ![kr](https://raw.githubusercontent.com/gosquared/flags/master/flags/flags/shiny/24/South-Korea.png) **Korean**: [tipjs/javascript-style-guide](https://github.com/tipjs/javascript-style-guide) - - ![pl](https://raw.githubusercontent.com/gosquared/flags/master/flags/flags/shiny/24/Poland.png) **Polish**: [mjurczyk/javascript](https://github.com/mjurczyk/javascript) - - ![ru](https://raw.githubusercontent.com/gosquared/flags/master/flags/flags/shiny/24/Russia.png) **Russian**: [uprock/javascript](https://github.com/uprock/javascript) - - ![es](https://raw.githubusercontent.com/gosquared/flags/master/flags/flags/shiny/24/Spain.png) **Spanish**: [paolocarrasco/javascript-style-guide](https://github.com/paolocarrasco/javascript-style-guide) - - ![th](https://raw.githubusercontent.com/gosquared/flags/master/flags/flags/shiny/24/Thailand.png) **Thai**: [lvarayut/javascript-style-guide](https://github.com/lvarayut/javascript-style-guide) - -## The JavaScript Style Guide Guide - - - [Reference](https://github.com/airbnb/javascript/wiki/The-JavaScript-Style-Guide-Guide) - -## Chat With Us About JavaScript - - - Find us on [gitter](https://gitter.im/airbnb/javascript). - -## Contributors - - - [View Contributors](https://github.com/airbnb/javascript/graphs/contributors) - - ## License (The MIT License) From 3f1dbcf5eff9c935e7d997a9dca20585ffa03750 Mon Sep 17 00:00:00 2001 From: Peter O'Shaughnessy Date: Tue, 9 Jun 2015 10:28:52 +0100 Subject: [PATCH 02/18] Update some instances of airbnb -> pebble {code} string replace --- README.md | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 0c5682b0f4..21ef0b8e7a 100644 --- a/README.md +++ b/README.md @@ -136,7 +136,7 @@ const item = {}; ``` - - [3.2](#3.2) Don't use [reserved words](http://es5.github.io/#x7.6.1) as keys. It won't work in IE8. [More info](https://github.com/pebble {code}/javascript/issues/61). + - [3.2](#3.2) Don't use [reserved words](http://es5.github.io/#x7.6.1) as keys. It won't work in IE8. [More info](https://github.com/pebblecode/javascript/issues/61). ```javascript // bad @@ -400,7 +400,7 @@ ``` - [6.2](#6.2) Strings longer than 80 characters should be written across multiple lines using string concatenation. - - [6.3](#6.3) Note: If overused, long strings with concatenation could impact performance. [jsPerf](http://jsperf.com/ya-string-concat) & [Discussion](https://github.com/pebble {code}/javascript/issues/40). + - [6.3](#6.3) Note: If overused, long strings with concatenation could impact performance. [jsPerf](http://jsperf.com/ya-string-concat) & [Discussion](https://github.com/pebblecode/javascript/issues/40). ```javascript // bad @@ -725,15 +725,15 @@ ```javascript // bad - const pebble {code}StyleGuide = require('./pebble {code}StyleGuide'); - module.exports = pebble {code}StyleGuide.es6; + const pebbleCodeStyleGuide = require('./pebbleCodeStyleGuide'); + module.exports = pebbleCodeStyleGuide.es6; // ok - import pebble {code}StyleGuide from './pebble {code}StyleGuide'; - export default pebble {code}StyleGuide.es6; + import pebbleCodeStyleGuide from './pebbleCodeStyleGuide'; + export default pebbleCodeStyleGuide.es6; // best - import { es6 } from './pebble {code}StyleGuide'; + import { es6 } from './pebbleCodeStyleGuide'; export default es6; ``` @@ -743,10 +743,10 @@ ```javascript // bad - import * as pebble {code}StyleGuide from './pebble {code}StyleGuide'; + import * as pebbleCodeStyleGuide from './pebbleCodeStyleGuide'; // good - import pebble {code}StyleGuide from './pebble {code}StyleGuide'; + import pebbleCodeStyleGuide from './pebbleCodeStyleGuide'; ``` - [10.3](#10.3) And do not export directly from an import. @@ -756,11 +756,11 @@ ```javascript // bad // filename es6.js - export { es6 as default } from './pebble {code}StyleGuide'; + export { es6 as default } from './pebbleCodeStyleGuide'; // good // filename es6.js - import { es6 } from './pebble {code}StyleGuide'; + import { es6 } from './pebbleCodeStyleGuide'; export default es6; ``` @@ -1578,7 +1578,7 @@ const val = inputValue >> 0; ``` - - [21.5](#21.5) **Note:** Be careful when using bitshift operations. Numbers are represented as [64-bit values](http://es5.github.io/#x4.3.19), but Bitshift operations always return a 32-bit integer ([source](http://es5.github.io/#x11.7)). Bitshift can lead to unexpected behavior for integer values larger than 32 bits. [Discussion](https://github.com/pebble {code}/javascript/issues/109). Largest signed 32-bit Int is 2,147,483,647: + - [21.5](#21.5) **Note:** Be careful when using bitshift operations. Numbers are represented as [64-bit values](http://es5.github.io/#x4.3.19), but Bitshift operations always return a 32-bit integer ([source](http://es5.github.io/#x11.7)). Bitshift can lead to unexpected behavior for integer values larger than 32 bits. [Discussion](https://github.com/pebbleCode/javascript/issues/109). Largest signed 32-bit Int is 2,147,483,647: ```javascript 2147483647 >> 0 //=> 2147483647 @@ -1726,12 +1726,12 @@ - [22.8](#22.8) Use PascalCase when you export a singleton / function library / bare object. ```javascript - const pebble {code}StyleGuide = { + const pebbleCodeStyleGuide = { es6: { } }; - export default pebble {code}StyleGuide; + export default pebbleCodeStyleGuide; ``` @@ -1955,8 +1955,8 @@ **Tools** - Code Style Linters - + [JSHint](http://www.jshint.com/) - [pebble {code} Style .jshintrc](https://github.com/pebble {code}/javascript/blob/master/linters/jshintrc) - + [JSCS](https://github.com/jscs-dev/node-jscs) - [pebble {code} Style Preset](https://github.com/jscs-dev/node-jscs/blob/master/presets/pebble {code}.json) + + [JSHint](http://www.jshint.com/) - [pebble {code} Style .jshintrc](https://github.com/pebblecode/javascript/blob/master/linters/jshintrc) + + [JSCS](https://github.com/jscs-dev/node-jscs) - [pebble {code} Style Preset](https://github.com/jscs-dev/node-jscs/blob/master/presets/airbnb.json) **Other Styleguides** @@ -1967,7 +1967,7 @@ **Other Styles** - [Naming this in nested functions](https://gist.github.com/4135065) - Christian Johansen - - [Conditional Callbacks](https://github.com/pebble {code}/javascript/issues/52) - Ross Allen + - [Conditional Callbacks](https://github.com/airbnb/javascript/issues/52) - Ross Allen - [Popular JavaScript Coding Conventions on Github](http://sideeffect.kr/popularconvention/#javascript) - JeongHoon Byun - [Multiple var statements in JavaScript, not superfluous](http://benalman.com/news/2012/05/multiple-var-statements-javascript/) - Ben Alman From fdbb222a649aec22ad05a8e7d6b67917f9686c33 Mon Sep 17 00:00:00 2001 From: Mike James Date: Tue, 10 Nov 2015 15:33:20 +0000 Subject: [PATCH 03/18] find and replace airbnb with pebblecode, thanks airbnb :) --- README.md | 58 +++++++++---------- es5/README.md | 28 ++++----- linters/.eslintrc | 2 +- linters/README.md | 2 +- .../SublimeLinter.sublime-settings | 2 +- package.json | 12 ++-- packages/eslint-config-airbnb/base.js | 7 --- packages/eslint-config-airbnb/index.js | 7 --- packages/eslint-config-airbnb/legacy.js | 21 ------- .../node_modules/eslint-config-airbnb | 1 - .../.eslintrc | 2 +- .../README.md | 32 +++++----- packages/eslint-config-pebblecode/base.js | 7 +++ packages/eslint-config-pebblecode/index.js | 7 +++ packages/eslint-config-pebblecode/legacy.js | 21 +++++++ .../package.json | 18 +++--- .../rules/best-practices.js | 0 .../rules/errors.js | 0 .../rules/es6.js | 0 .../rules/legacy.js | 0 .../rules/node.js | 0 .../rules/react.js | 0 .../rules/strict.js | 0 .../rules/style.js | 0 .../rules/variables.js | 0 .../test/.eslintrc | 0 .../test/test-base.js | 0 .../test/test-react-order.js | 0 react/README.md | 2 +- 29 files changed, 116 insertions(+), 113 deletions(-) delete mode 100644 packages/eslint-config-airbnb/base.js delete mode 100644 packages/eslint-config-airbnb/index.js delete mode 100644 packages/eslint-config-airbnb/legacy.js delete mode 120000 packages/eslint-config-airbnb/node_modules/eslint-config-airbnb rename packages/{eslint-config-airbnb => eslint-config-pebblecode}/.eslintrc (87%) rename packages/{eslint-config-airbnb => eslint-config-pebblecode}/README.md (61%) create mode 100644 packages/eslint-config-pebblecode/base.js create mode 100644 packages/eslint-config-pebblecode/index.js create mode 100644 packages/eslint-config-pebblecode/legacy.js rename packages/{eslint-config-airbnb => eslint-config-pebblecode}/package.json (65%) rename packages/{eslint-config-airbnb => eslint-config-pebblecode}/rules/best-practices.js (100%) rename packages/{eslint-config-airbnb => eslint-config-pebblecode}/rules/errors.js (100%) rename packages/{eslint-config-airbnb => eslint-config-pebblecode}/rules/es6.js (100%) rename packages/{eslint-config-airbnb => eslint-config-pebblecode}/rules/legacy.js (100%) rename packages/{eslint-config-airbnb => eslint-config-pebblecode}/rules/node.js (100%) rename packages/{eslint-config-airbnb => eslint-config-pebblecode}/rules/react.js (100%) rename packages/{eslint-config-airbnb => eslint-config-pebblecode}/rules/strict.js (100%) rename packages/{eslint-config-airbnb => eslint-config-pebblecode}/rules/style.js (100%) rename packages/{eslint-config-airbnb => eslint-config-pebblecode}/rules/variables.js (100%) rename packages/{eslint-config-airbnb => eslint-config-pebblecode}/test/.eslintrc (100%) rename packages/{eslint-config-airbnb => eslint-config-pebblecode}/test/test-base.js (100%) rename packages/{eslint-config-airbnb => eslint-config-pebblecode}/test/test-react-order.js (100%) diff --git a/README.md b/README.md index faadf80e4e..2df6bf86d3 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,15 @@ -# Airbnb JavaScript Style Guide() { +# pebblecode JavaScript Style Guide() { *A mostly reasonable approach to JavaScript* -[![Downloads](https://img.shields.io/npm/dm/eslint-config-airbnb.svg)](https://www.npmjs.com/package/eslint-config-airbnb) -[![Gitter](https://badges.gitter.im/Join Chat.svg)](https://gitter.im/airbnb/javascript?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) +[![Downloads](https://img.shields.io/npm/dm/eslint-config-pebblecode.svg)](https://www.npmjs.com/package/eslint-config-pebblecode) +[![Gitter](https://badges.gitter.im/Join Chat.svg)](https://gitter.im/pebblecode/javascript?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) Other Style Guides - [ES5](es5/) - [React](react/) - - [CSS & Sass](https://github.com/airbnb/css) - - [Ruby](https://github.com/airbnb/ruby) + - [CSS & Sass](https://github.com/pebblecode/css) + - [Ruby](https://github.com/pebblecode/ruby) ## Table of Contents @@ -145,7 +145,7 @@ Other Style Guides const item = {}; ``` - - [3.2](#3.2) If your code will be executed in browsers in script context, don't use [reserved words](http://es5.github.io/#x7.6.1) as keys. It won't work in IE8. [More info](https://github.com/airbnb/javascript/issues/61). It’s OK to use them in ES6 modules and server-side code. + - [3.2](#3.2) If your code will be executed in browsers in script context, don't use [reserved words](http://es5.github.io/#x7.6.1) as keys. It won't work in IE8. [More info](https://github.com/pebblecode/javascript/issues/61). It’s OK to use them in ES6 modules and server-side code. ```javascript // bad @@ -408,7 +408,7 @@ Other Style Guides ``` - [6.2](#6.2) Strings longer than 100 characters should be written across multiple lines using string concatenation. - - [6.3](#6.3) Note: If overused, long strings with concatenation could impact performance. [jsPerf](http://jsperf.com/ya-string-concat) & [Discussion](https://github.com/airbnb/javascript/issues/40). + - [6.3](#6.3) Note: If overused, long strings with concatenation could impact performance. [jsPerf](http://jsperf.com/ya-string-concat) & [Discussion](https://github.com/pebblecode/javascript/issues/40). ```javascript // bad @@ -799,15 +799,15 @@ Other Style Guides ```javascript // bad - const AirbnbStyleGuide = require('./AirbnbStyleGuide'); - module.exports = AirbnbStyleGuide.es6; + const pebblecodeStyleGuide = require('./pebblecodeStyleGuide'); + module.exports = pebblecodeStyleGuide.es6; // ok - import AirbnbStyleGuide from './AirbnbStyleGuide'; - export default AirbnbStyleGuide.es6; + import pebblecodeStyleGuide from './pebblecodeStyleGuide'; + export default pebblecodeStyleGuide.es6; // best - import { es6 } from './AirbnbStyleGuide'; + import { es6 } from './pebblecodeStyleGuide'; export default es6; ``` @@ -817,10 +817,10 @@ Other Style Guides ```javascript // bad - import * as AirbnbStyleGuide from './AirbnbStyleGuide'; + import * as pebblecodeStyleGuide from './pebblecodeStyleGuide'; // good - import AirbnbStyleGuide from './AirbnbStyleGuide'; + import pebblecodeStyleGuide from './pebblecodeStyleGuide'; ``` - [10.3](#10.3) And do not export directly from an import. @@ -830,11 +830,11 @@ Other Style Guides ```javascript // bad // filename es6.js - export { es6 as default } from './airbnbStyleGuide'; + export { es6 as default } from './pebblecodeStyleGuide'; // good // filename es6.js - import { es6 } from './AirbnbStyleGuide'; + import { es6 } from './pebblecodeStyleGuide'; export default es6; ``` @@ -1716,7 +1716,7 @@ Other Style Guides const val = inputValue >> 0; ``` - - [21.5](#21.5) **Note:** Be careful when using bitshift operations. Numbers are represented as [64-bit values](http://es5.github.io/#x4.3.19), but Bitshift operations always return a 32-bit integer ([source](http://es5.github.io/#x11.7)). Bitshift can lead to unexpected behavior for integer values larger than 32 bits. [Discussion](https://github.com/airbnb/javascript/issues/109). Largest signed 32-bit Int is 2,147,483,647: + - [21.5](#21.5) **Note:** Be careful when using bitshift operations. Numbers are represented as [64-bit values](http://es5.github.io/#x4.3.19), but Bitshift operations always return a 32-bit integer ([source](http://es5.github.io/#x11.7)). Bitshift can lead to unexpected behavior for integer values larger than 32 bits. [Discussion](https://github.com/pebblecode/javascript/issues/109). Largest signed 32-bit Int is 2,147,483,647: ```javascript 2147483647 >> 0 //=> 2147483647 @@ -1864,12 +1864,12 @@ Other Style Guides - [22.8](#22.8) Use PascalCase when you export a singleton / function library / bare object. ```javascript - const AirbnbStyleGuide = { + const pebblecodeStyleGuide = { es6: { } }; - export default AirbnbStyleGuide; + export default pebblecodeStyleGuide; ``` @@ -2067,7 +2067,7 @@ Other Style Guides - Whichever testing framework you use, you should be writing tests! - Strive to write many small pure functions, and minimize where mutations occur. - Be cautious about stubs and mocks - they can make your tests more brittle. - - We primarily use [`mocha`](https://www.npmjs.com/package/mocha) at Airbnb. [`tape`](https://www.npmjs.com/package/tape) is also used occasionally for small, separate modules. + - We primarily use [`mocha`](https://www.npmjs.com/package/mocha) at pebblecode. [`tape`](https://www.npmjs.com/package/tape) is also used occasionally for small, separate modules. - 100% test coverage is a good goal to strive for, even if it's not always practical to reach it. - Whenever you fix a bug, _write a regression test_. A bug fixed without a regression test is almost certainly going to break again in the future. @@ -2104,9 +2104,9 @@ Other Style Guides **Tools** - Code Style Linters - + [ESlint](http://eslint.org/) - [Airbnb Style .eslintrc](https://github.com/airbnb/javascript/blob/master/linters/.eslintrc) - + [JSHint](http://jshint.com/) - [Airbnb Style .jshintrc](https://github.com/airbnb/javascript/blob/master/linters/jshintrc) - + [JSCS](https://github.com/jscs-dev/node-jscs) - [Airbnb Style Preset](https://github.com/jscs-dev/node-jscs/blob/master/presets/airbnb.json) + + [ESlint](http://eslint.org/) - [pebblecode Style .eslintrc](https://github.com/pebblecode/javascript/blob/master/linters/.eslintrc) + + [JSHint](http://jshint.com/) - [pebblecode Style .jshintrc](https://github.com/pebblecode/javascript/blob/master/linters/jshintrc) + + [JSCS](https://github.com/jscs-dev/node-jscs) - [pebblecode Style Preset](https://github.com/jscs-dev/node-jscs/blob/master/presets/pebblecode.json) **Other Style Guides** @@ -2117,7 +2117,7 @@ Other Style Guides **Other Styles** - [Naming this in nested functions](https://gist.github.com/cjohansen/4135065) - Christian Johansen - - [Conditional Callbacks](https://github.com/airbnb/javascript/issues/52) - Ross Allen + - [Conditional Callbacks](https://github.com/pebblecode/javascript/issues/52) - Ross Allen - [Popular JavaScript Coding Conventions on Github](http://sideeffect.kr/popularconvention/#javascript) - JeongHoon Byun - [Multiple var statements in JavaScript, not superfluous](http://benalman.com/news/2012/05/multiple-var-statements-javascript/) - Ben Alman @@ -2175,7 +2175,7 @@ Other Style Guides - **Aan Zee**: [AanZee/javascript](https://github.com/AanZee/javascript) - **Adult Swim**: [adult-swim/javascript](https://github.com/adult-swim/javascript) - - **Airbnb**: [airbnb/javascript](https://github.com/airbnb/javascript) + - **pebblecode**: [pebblecode/javascript](https://github.com/pebblecode/javascript) - **Apartmint**: [apartmint/javascript](https://github.com/apartmint/javascript) - **Avalara**: [avalara/javascript](https://github.com/avalara/javascript) - **Billabong**: [billabong/javascript](https://github.com/billabong/javascript) @@ -2252,22 +2252,22 @@ Other Style Guides ## The JavaScript Style Guide Guide - - [Reference](https://github.com/airbnb/javascript/wiki/The-JavaScript-Style-Guide-Guide) + - [Reference](https://github.com/pebblecode/javascript/wiki/The-JavaScript-Style-Guide-Guide) ## Chat With Us About JavaScript - - Find us on [gitter](https://gitter.im/airbnb/javascript). + - Find us on [gitter](https://gitter.im/pebblecode/javascript). ## Contributors - - [View Contributors](https://github.com/airbnb/javascript/graphs/contributors) + - [View Contributors](https://github.com/pebblecode/javascript/graphs/contributors) ## License (The MIT License) -Copyright (c) 2014 Airbnb +Copyright (c) 2014 pebblecode Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the diff --git a/es5/README.md b/es5/README.md index 2d24f1a4a2..536d31a726 100644 --- a/es5/README.md +++ b/es5/README.md @@ -1,6 +1,6 @@ -[![Gitter](https://badges.gitter.im/Join Chat.svg)](https://gitter.im/airbnb/javascript?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) +[![Gitter](https://badges.gitter.im/Join Chat.svg)](https://gitter.im/pebblecode/javascript?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) -# Airbnb JavaScript Style Guide() { +# pebblecode JavaScript Style Guide() { *A mostly reasonable approach to JavaScript* @@ -86,7 +86,7 @@ var item = {}; ``` - - Don't use [reserved words](http://es5.github.io/#x7.6.1) as keys. It won't work in IE8. [More info](https://github.com/airbnb/javascript/issues/61). + - Don't use [reserved words](http://es5.github.io/#x7.6.1) as keys. It won't work in IE8. [More info](https://github.com/pebblecode/javascript/issues/61). ```javascript // bad @@ -195,7 +195,7 @@ ``` - Strings longer than 100 characters should be written across multiple lines using string concatenation. - - Note: If overused, long strings with concatenation could impact performance. [jsPerf](http://jsperf.com/ya-string-concat) & [Discussion](https://github.com/airbnb/javascript/issues/40). + - Note: If overused, long strings with concatenation could impact performance. [jsPerf](http://jsperf.com/ya-string-concat) & [Discussion](https://github.com/pebblecode/javascript/issues/40). ```javascript // bad @@ -1100,7 +1100,7 @@ var val = inputValue >> 0; ``` - - **Note:** Be careful when using bitshift operations. Numbers are represented as [64-bit values](http://es5.github.io/#x4.3.19), but Bitshift operations always return a 32-bit integer ([source](http://es5.github.io/#x11.7)). Bitshift can lead to unexpected behavior for integer values larger than 32 bits. [Discussion](https://github.com/airbnb/javascript/issues/109). Largest signed 32-bit Int is 2,147,483,647: + - **Note:** Be careful when using bitshift operations. Numbers are represented as [64-bit values](http://es5.github.io/#x4.3.19), but Bitshift operations always return a 32-bit integer ([source](http://es5.github.io/#x11.7)). Bitshift can lead to unexpected behavior for integer values larger than 32 bits. [Discussion](https://github.com/pebblecode/javascript/issues/109). Largest signed 32-bit Int is 2,147,483,647: ```javascript 2147483647 >> 0 //=> 2147483647 @@ -1427,7 +1427,7 @@ ## Modules - - The module should start with a `!`. This ensures that if a malformed module forgets to include a final semicolon there aren't errors in production when the scripts get concatenated. [Explanation](https://github.com/airbnb/javascript/issues/44#issuecomment-13063933) + - The module should start with a `!`. This ensures that if a malformed module forgets to include a final semicolon there aren't errors in production when the scripts get concatenated. [Explanation](https://github.com/pebblecode/javascript/issues/44#issuecomment-13063933) - The file should be named with camelCase, live in a folder with the same name, and match the name of the single export. - Add a method called `noConflict()` that sets the exported module to the previous version and returns this one. - Always declare `'use strict';` at the top of the module. @@ -1562,8 +1562,8 @@ **Tools** - Code Style Linters - + [JSHint](http://www.jshint.com/) - [Airbnb Style .jshintrc](https://github.com/airbnb/javascript/blob/master/linters/jshintrc) - + [JSCS](https://github.com/jscs-dev/node-jscs) - [Airbnb Style Preset](https://github.com/jscs-dev/node-jscs/blob/master/presets/airbnb.json) + + [JSHint](http://www.jshint.com/) - [pebblecode Style .jshintrc](https://github.com/pebblecode/javascript/blob/master/linters/jshintrc) + + [JSCS](https://github.com/jscs-dev/node-jscs) - [pebblecode Style Preset](https://github.com/jscs-dev/node-jscs/blob/master/presets/pebblecode.json) **Other Style Guides** @@ -1575,7 +1575,7 @@ **Other Styles** - [Naming this in nested functions](https://gist.github.com/4135065) - Christian Johansen - - [Conditional Callbacks](https://github.com/airbnb/javascript/issues/52) - Ross Allen + - [Conditional Callbacks](https://github.com/pebblecode/javascript/issues/52) - Ross Allen - [Popular JavaScript Coding Conventions on Github](http://sideeffect.kr/popularconvention/#javascript) - JeongHoon Byun - [Multiple var statements in JavaScript, not superfluous](http://benalman.com/news/2012/05/multiple-var-statements-javascript/) - Ben Alman @@ -1633,7 +1633,7 @@ - **Aan Zee**: [AanZee/javascript](https://github.com/AanZee/javascript) - **Adult Swim**: [adult-swim/javascript](https://github.com/adult-swim/javascript) - - **Airbnb**: [airbnb/javascript](https://github.com/airbnb/javascript) + - **pebblecode**: [pebblecode/javascript](https://github.com/pebblecode/javascript) - **Apartmint**: [apartmint/javascript](https://github.com/apartmint/javascript) - **Avalara**: [avalara/javascript](https://github.com/avalara/javascript) - **Billabong**: [billabong/javascript](https://github.com/billabong/javascript) @@ -1701,22 +1701,22 @@ ## The JavaScript Style Guide Guide - - [Reference](https://github.com/airbnb/javascript/wiki/The-JavaScript-Style-Guide-Guide) + - [Reference](https://github.com/pebblecode/javascript/wiki/The-JavaScript-Style-Guide-Guide) ## Chat With Us About JavaScript - - Find us on [gitter](https://gitter.im/airbnb/javascript). + - Find us on [gitter](https://gitter.im/pebblecode/javascript). ## Contributors - - [View Contributors](https://github.com/airbnb/javascript/graphs/contributors) + - [View Contributors](https://github.com/pebblecode/javascript/graphs/contributors) ## License (The MIT License) -Copyright (c) 2014 Airbnb +Copyright (c) 2014 pebblecode Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the diff --git a/linters/.eslintrc b/linters/.eslintrc index 9e203a5473..1817f2064a 100644 --- a/linters/.eslintrc +++ b/linters/.eslintrc @@ -1,5 +1,5 @@ // Use this file as a starting point for your project's .eslintrc. // Copy this file, and add rule overrides as needed. { - "extends": "airbnb" + "extends": "pebblecode" } diff --git a/linters/README.md b/linters/README.md index 1deac701c7..23d5a8a324 100644 --- a/linters/README.md +++ b/linters/README.md @@ -4,7 +4,7 @@ Our `.eslintrc` requires the following NPM packages: ``` npm install --save-dev \ - eslint-config-airbnb \ + eslint-config-pebblecode \ eslint \ babel-eslint \ eslint-plugin-react diff --git a/linters/SublimeLinter/SublimeLinter.sublime-settings b/linters/SublimeLinter/SublimeLinter.sublime-settings index 12360f3f1c..ec0ee95bb1 100644 --- a/linters/SublimeLinter/SublimeLinter.sublime-settings +++ b/linters/SublimeLinter/SublimeLinter.sublime-settings @@ -1,5 +1,5 @@ /** - * Airbnb JSHint settings for use with SublimeLinter and Sublime Text 2. + * pebblecode JSHint settings for use with SublimeLinter and Sublime Text 2. * * 1. Install SublimeLinter at https://github.com/SublimeLinter/SublimeLinter * 2. Open user preferences for the SublimeLinter package in Sublime Text 2 diff --git a/package.json b/package.json index dc0225dc08..504370f4f9 100644 --- a/package.json +++ b/package.json @@ -1,19 +1,19 @@ { - "name": "airbnb-style", + "name": "pebblecode-style", "version": "2.0.0", "description": "A mostly reasonable approach to JavaScript.", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", - "publish-all": "npm publish && cd ./packages/eslint-config-airbnb && npm publish" + "publish-all": "npm publish && cd ./packages/eslint-config-pebblecode && npm publish" }, "repository": { "type": "git", - "url": "https://github.com/airbnb/javascript.git" + "url": "https://github.com/pebblecode/javascript.git" }, "keywords": [ "style guide", "lint", - "airbnb", + "pebblecode", "es6", "es2015", "react", @@ -22,7 +22,7 @@ "author": "Harrison Shoff (https://twitter.com/hshoff)", "license": "MIT", "bugs": { - "url": "https://github.com/airbnb/javascript/issues" + "url": "https://github.com/pebblecode/javascript/issues" }, - "homepage": "https://github.com/airbnb/javascript" + "homepage": "https://github.com/pebblecode/javascript" } diff --git a/packages/eslint-config-airbnb/base.js b/packages/eslint-config-airbnb/base.js deleted file mode 100644 index db661c5d1a..0000000000 --- a/packages/eslint-config-airbnb/base.js +++ /dev/null @@ -1,7 +0,0 @@ -module.exports = { - 'extends': [ - 'eslint-config-airbnb/legacy', - 'eslint-config-airbnb/rules/es6', - ], - 'rules': {} -}; diff --git a/packages/eslint-config-airbnb/index.js b/packages/eslint-config-airbnb/index.js deleted file mode 100644 index 46d601fe3f..0000000000 --- a/packages/eslint-config-airbnb/index.js +++ /dev/null @@ -1,7 +0,0 @@ -module.exports = { - 'extends': [ - 'eslint-config-airbnb/base', - 'eslint-config-airbnb/rules/react', - ], - rules: {} -}; diff --git a/packages/eslint-config-airbnb/legacy.js b/packages/eslint-config-airbnb/legacy.js deleted file mode 100644 index 83a4931e84..0000000000 --- a/packages/eslint-config-airbnb/legacy.js +++ /dev/null @@ -1,21 +0,0 @@ -module.exports = { - 'extends': [ - 'eslint-config-airbnb/rules/best-practices', - 'eslint-config-airbnb/rules/errors', - 'eslint-config-airbnb/rules/legacy', - 'eslint-config-airbnb/rules/node', - 'eslint-config-airbnb/rules/strict', - 'eslint-config-airbnb/rules/style', - 'eslint-config-airbnb/rules/variables' - ], - 'env': { - 'browser': true, - 'node': true, - 'amd': false, - 'mocha': false, - 'jasmine': false - }, - 'ecmaFeatures': {}, - 'globals': {}, - 'rules': {} -}; diff --git a/packages/eslint-config-airbnb/node_modules/eslint-config-airbnb b/packages/eslint-config-airbnb/node_modules/eslint-config-airbnb deleted file mode 120000 index a96aa0ea9d..0000000000 --- a/packages/eslint-config-airbnb/node_modules/eslint-config-airbnb +++ /dev/null @@ -1 +0,0 @@ -.. \ No newline at end of file diff --git a/packages/eslint-config-airbnb/.eslintrc b/packages/eslint-config-pebblecode/.eslintrc similarity index 87% rename from packages/eslint-config-airbnb/.eslintrc rename to packages/eslint-config-pebblecode/.eslintrc index 4b3b1fa429..16477a237a 100644 --- a/packages/eslint-config-airbnb/.eslintrc +++ b/packages/eslint-config-pebblecode/.eslintrc @@ -1,5 +1,5 @@ { - "extends": "airbnb", + "extends": "pebblecode", "rules": { // disable requiring trailing commas because it might be nice to revert to // being JSON at some point, and I don't want to make big changes now. diff --git a/packages/eslint-config-airbnb/README.md b/packages/eslint-config-pebblecode/README.md similarity index 61% rename from packages/eslint-config-airbnb/README.md rename to packages/eslint-config-pebblecode/README.md index b328aa9eb6..762165aca0 100644 --- a/packages/eslint-config-airbnb/README.md +++ b/packages/eslint-config-pebblecode/README.md @@ -1,34 +1,34 @@ -# eslint-config-airbnb +# eslint-config-pebblecode -This package provides Airbnb's .eslintrc as an extensible shared config. +This package provides pebblecode's .eslintrc as an extensible shared config. ## Usage We export three ESLint configurations for your usage. -### eslint-config-airbnb +### eslint-config-pebblecode Our default export contains all of our ESLint rules, including EcmaScript 6+ and React. It requires `eslint` and `eslint-plugin-react`. -1. `npm install --save-dev eslint-config-airbnb eslint-plugin-react eslint` -2. add `"extends": "airbnb"` to your .eslintrc +1. `npm install --save-dev eslint-config-pebblecode eslint-plugin-react eslint` +2. add `"extends": "pebblecode"` to your .eslintrc -### eslint-config-airbnb/base +### eslint-config-pebblecode/base Lints ES6+ but does not lint React. Requires `eslint`. -1. `npm install --save-dev eslint-config-airbnb eslint` -2. add `"extends": "airbnb/base"` to your .eslintrc +1. `npm install --save-dev eslint-config-pebblecode eslint` +2. add `"extends": "pebblecode/base"` to your .eslintrc -### eslint-config-airbnb/legacy +### eslint-config-pebblecode/legacy Lints ES5 and below. Only requires `eslint`. -1. `npm install --save-dev eslint-config-airbnb eslint` -2. add `"extends": "airbnb/legacy"` to your .eslintrc +1. `npm install --save-dev eslint-config-pebblecode eslint` +2. add `"extends": "pebblecode/legacy"` to your .eslintrc -See [Airbnb's Javascript styleguide](https://github.com/airbnb/javascript) and +See [pebblecode's Javascript styleguide](https://github.com/pebblecode/javascript) and the [ESlint config docs](http://eslint.org/docs/user-guide/configuring#extending-configuration-files) for more information. @@ -58,14 +58,14 @@ You can make sure this module lints with itself using `npm run lint`. - switch to modular rules files courtesy the [eslint-config-default][ecd] project and [@taion][taion]. [PR][pr-modular] -- export `eslint-config-airbnb/legacy` for ES5-only users. - `eslint-config-airbnb/legacy` does not require the `babel-eslint` parser. +- export `eslint-config-pebblecode/legacy` for ES5-only users. + `eslint-config-pebblecode/legacy` does not require the `babel-eslint` parser. [PR][pr-legacy] [ecd]: https://github.com/walmartlabs/eslint-config-defaults [taion]: https://github.com/taion -[pr-modular]: https://github.com/airbnb/javascript/pull/526 -[pr-legacy]: https://github.com/airbnb/javascript/pull/527 +[pr-modular]: https://github.com/pebblecode/javascript/pull/526 +[pr-legacy]: https://github.com/pebblecode/javascript/pull/527 ### 0.0.9 diff --git a/packages/eslint-config-pebblecode/base.js b/packages/eslint-config-pebblecode/base.js new file mode 100644 index 0000000000..668a8a88bf --- /dev/null +++ b/packages/eslint-config-pebblecode/base.js @@ -0,0 +1,7 @@ +module.exports = { + 'extends': [ + 'eslint-config-pebblecode/legacy', + 'eslint-config-pebblecode/rules/es6', + ], + 'rules': {} +}; diff --git a/packages/eslint-config-pebblecode/index.js b/packages/eslint-config-pebblecode/index.js new file mode 100644 index 0000000000..79a9c354f6 --- /dev/null +++ b/packages/eslint-config-pebblecode/index.js @@ -0,0 +1,7 @@ +module.exports = { + 'extends': [ + 'eslint-config-pebblecode/base', + 'eslint-config-pebblecode/rules/react', + ], + rules: {} +}; diff --git a/packages/eslint-config-pebblecode/legacy.js b/packages/eslint-config-pebblecode/legacy.js new file mode 100644 index 0000000000..7f9666ef98 --- /dev/null +++ b/packages/eslint-config-pebblecode/legacy.js @@ -0,0 +1,21 @@ +module.exports = { + 'extends': [ + 'eslint-config-pebblecode/rules/best-practices', + 'eslint-config-pebblecode/rules/errors', + 'eslint-config-pebblecode/rules/legacy', + 'eslint-config-pebblecode/rules/node', + 'eslint-config-pebblecode/rules/strict', + 'eslint-config-pebblecode/rules/style', + 'eslint-config-pebblecode/rules/variables' + ], + 'env': { + 'browser': true, + 'node': true, + 'amd': false, + 'mocha': false, + 'jasmine': false + }, + 'ecmaFeatures': {}, + 'globals': {}, + 'rules': {} +}; diff --git a/packages/eslint-config-airbnb/package.json b/packages/eslint-config-pebblecode/package.json similarity index 65% rename from packages/eslint-config-airbnb/package.json rename to packages/eslint-config-pebblecode/package.json index 7eaca47e71..04621e2825 100644 --- a/packages/eslint-config-airbnb/package.json +++ b/packages/eslint-config-pebblecode/package.json @@ -1,7 +1,7 @@ { - "name": "eslint-config-airbnb", - "version": "1.0.0", - "description": "Airbnb's ESLint config, following our styleguide", + "name": "eslint-config-pebblecode", + "version": "1.0.1", + "description": "pebblecode's ESLint config, following our styleguide, fork of airbnb styleguide", "main": "index.js", "scripts": { "lint": "eslint .", @@ -9,13 +9,13 @@ }, "repository": { "type": "git", - "url": "https://github.com/airbnb/javascript" + "url": "https://github.com/pebblecode/javascript" }, "keywords": [ "eslint", "eslintconfig", "config", - "airbnb", + "pebblecode", "javascript", "styleguide" ], @@ -29,13 +29,17 @@ "name": "Jordan Harband", "email": "ljharb@gmail.com", "url": "http://ljharb.codes" + }, + { + "name": "pebblecode", + "email": "opensource@pebblecode.com" } ], "license": "MIT", "bugs": { - "url": "https://github.com/airbnb/javascript/issues" + "url": "https://github.com/pebblecode/javascript/issues" }, - "homepage": "https://github.com/airbnb/javascript", + "homepage": "https://github.com/pebblecode/javascript", "devDependencies": { "babel-tape-runner": "1.2.0", "eslint": "^1.8.0", diff --git a/packages/eslint-config-airbnb/rules/best-practices.js b/packages/eslint-config-pebblecode/rules/best-practices.js similarity index 100% rename from packages/eslint-config-airbnb/rules/best-practices.js rename to packages/eslint-config-pebblecode/rules/best-practices.js diff --git a/packages/eslint-config-airbnb/rules/errors.js b/packages/eslint-config-pebblecode/rules/errors.js similarity index 100% rename from packages/eslint-config-airbnb/rules/errors.js rename to packages/eslint-config-pebblecode/rules/errors.js diff --git a/packages/eslint-config-airbnb/rules/es6.js b/packages/eslint-config-pebblecode/rules/es6.js similarity index 100% rename from packages/eslint-config-airbnb/rules/es6.js rename to packages/eslint-config-pebblecode/rules/es6.js diff --git a/packages/eslint-config-airbnb/rules/legacy.js b/packages/eslint-config-pebblecode/rules/legacy.js similarity index 100% rename from packages/eslint-config-airbnb/rules/legacy.js rename to packages/eslint-config-pebblecode/rules/legacy.js diff --git a/packages/eslint-config-airbnb/rules/node.js b/packages/eslint-config-pebblecode/rules/node.js similarity index 100% rename from packages/eslint-config-airbnb/rules/node.js rename to packages/eslint-config-pebblecode/rules/node.js diff --git a/packages/eslint-config-airbnb/rules/react.js b/packages/eslint-config-pebblecode/rules/react.js similarity index 100% rename from packages/eslint-config-airbnb/rules/react.js rename to packages/eslint-config-pebblecode/rules/react.js diff --git a/packages/eslint-config-airbnb/rules/strict.js b/packages/eslint-config-pebblecode/rules/strict.js similarity index 100% rename from packages/eslint-config-airbnb/rules/strict.js rename to packages/eslint-config-pebblecode/rules/strict.js diff --git a/packages/eslint-config-airbnb/rules/style.js b/packages/eslint-config-pebblecode/rules/style.js similarity index 100% rename from packages/eslint-config-airbnb/rules/style.js rename to packages/eslint-config-pebblecode/rules/style.js diff --git a/packages/eslint-config-airbnb/rules/variables.js b/packages/eslint-config-pebblecode/rules/variables.js similarity index 100% rename from packages/eslint-config-airbnb/rules/variables.js rename to packages/eslint-config-pebblecode/rules/variables.js diff --git a/packages/eslint-config-airbnb/test/.eslintrc b/packages/eslint-config-pebblecode/test/.eslintrc similarity index 100% rename from packages/eslint-config-airbnb/test/.eslintrc rename to packages/eslint-config-pebblecode/test/.eslintrc diff --git a/packages/eslint-config-airbnb/test/test-base.js b/packages/eslint-config-pebblecode/test/test-base.js similarity index 100% rename from packages/eslint-config-airbnb/test/test-base.js rename to packages/eslint-config-pebblecode/test/test-base.js diff --git a/packages/eslint-config-airbnb/test/test-react-order.js b/packages/eslint-config-pebblecode/test/test-react-order.js similarity index 100% rename from packages/eslint-config-airbnb/test/test-react-order.js rename to packages/eslint-config-pebblecode/test/test-react-order.js diff --git a/react/README.md b/react/README.md index 6b0a8e13e9..6b88fa06fc 100644 --- a/react/README.md +++ b/react/README.md @@ -1,4 +1,4 @@ -# Airbnb React/JSX Style Guide +# pebblecode React/JSX Style Guide *A mostly reasonable approach to React and JSX* From 1ab2141a374c7c4d9c4bcc7ec5d89f6ee6f92b72 Mon Sep 17 00:00:00 2001 From: Mike James Date: Tue, 10 Nov 2015 15:55:46 +0000 Subject: [PATCH 04/18] style http://eslint.org/docs/rules/comma-dangle [2,'never'] we don't like dangling commas --- README.md | 9 +++++---- packages/eslint-config-pebblecode/.eslintrc | 7 +------ packages/eslint-config-pebblecode/rules/style.js | 1 + 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 2df6bf86d3..4fab99430b 100644 --- a/README.md +++ b/README.md @@ -1555,7 +1555,7 @@ Other Style Guides **[⬆ back to top](#table-of-contents)** ## Commas - + ***** THIS RULE IS DIFFERENT TO AIRBNB ********* - [19.1](#19.1) Leading commas: **Nope.** ```javascript @@ -1570,7 +1570,7 @@ Other Style Guides const story = [ once, upon, - aTime, + aTime ]; // bad @@ -1586,12 +1586,13 @@ Other Style Guides firstName: 'Ada', lastName: 'Lovelace', birthYear: 1815, - superPower: 'computers', + superPower: 'computers' }; ``` - - [19.2](#19.2) Additional trailing comma: **Yup.** + - [19.2](#19.2) Additional trailing comma: **NO.** + ***** THIS RULE IS DIFFERENT TO AIRBNB ********* > Why? This leads to cleaner git diffs. Also, transpilers like Babel will remove the additional trailing comma in the transpiled code which means you don't have to worry about the [trailing comma problem](es5/README.md#commas) in legacy browsers. ```javascript diff --git a/packages/eslint-config-pebblecode/.eslintrc b/packages/eslint-config-pebblecode/.eslintrc index 16477a237a..acf38976e7 100644 --- a/packages/eslint-config-pebblecode/.eslintrc +++ b/packages/eslint-config-pebblecode/.eslintrc @@ -1,8 +1,3 @@ { - "extends": "pebblecode", - "rules": { - // disable requiring trailing commas because it might be nice to revert to - // being JSON at some point, and I don't want to make big changes now. - "comma-dangle": 0 - } + "extends": "pebblecode" } diff --git a/packages/eslint-config-pebblecode/rules/style.js b/packages/eslint-config-pebblecode/rules/style.js index c1d9ab9df8..3eb4fc6f81 100644 --- a/packages/eslint-config-pebblecode/rules/style.js +++ b/packages/eslint-config-pebblecode/rules/style.js @@ -10,6 +10,7 @@ module.exports = { 'comma-spacing': [2, {'before': false, 'after': true}], // enforce one true comma style 'comma-style': [2, 'last'], + 'comma-dangle': [2, 'never'], // require or disallow padding inside computed properties 'computed-property-spacing': 0, // enforces consistent naming when capturing the current execution context From 6356c57aa63777d2d8ea5de7cb90b6c9e7c3cd11 Mon Sep 17 00:00:00 2001 From: Mike James Date: Tue, 10 Nov 2015 15:56:15 +0000 Subject: [PATCH 05/18] 0.1.1! --- packages/eslint-config-pebblecode/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/eslint-config-pebblecode/package.json b/packages/eslint-config-pebblecode/package.json index 04621e2825..942cec08c9 100644 --- a/packages/eslint-config-pebblecode/package.json +++ b/packages/eslint-config-pebblecode/package.json @@ -1,6 +1,6 @@ { "name": "eslint-config-pebblecode", - "version": "1.0.1", + "version": "1.1.0", "description": "pebblecode's ESLint config, following our styleguide, fork of airbnb styleguide", "main": "index.js", "scripts": { From 1dcc5cd281290ae0be58ddaca58ecb65523d7380 Mon Sep 17 00:00:00 2001 From: Mike James Date: Tue, 10 Nov 2015 16:32:48 +0000 Subject: [PATCH 06/18] allow pad block --- packages/eslint-config-pebblecode/rules/node.js | 3 ++- packages/eslint-config-pebblecode/rules/style.js | 2 -- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/eslint-config-pebblecode/rules/node.js b/packages/eslint-config-pebblecode/rules/node.js index 16b6f20d45..b3e43522f7 100644 --- a/packages/eslint-config-pebblecode/rules/node.js +++ b/packages/eslint-config-pebblecode/rules/node.js @@ -1,6 +1,7 @@ module.exports = { 'env': { - 'node': true + 'node': true, + 'mocha': true }, 'rules': { // enforce return after a callback diff --git a/packages/eslint-config-pebblecode/rules/style.js b/packages/eslint-config-pebblecode/rules/style.js index 3eb4fc6f81..3f7e172801 100644 --- a/packages/eslint-config-pebblecode/rules/style.js +++ b/packages/eslint-config-pebblecode/rules/style.js @@ -75,8 +75,6 @@ module.exports = { 'operator-assignment': 0, // enforce operators to be placed before or after line breaks 'operator-linebreak': 0, - // enforce padding within blocks - 'padded-blocks': [2, 'never'], // require quotes around object literal property names 'quote-props': 0, // specify whether double or single quotes should be used From a25028f94a5ac07d81e497a63d463f65ebe5d2d7 Mon Sep 17 00:00:00 2001 From: Mike James Date: Tue, 10 Nov 2015 16:33:01 +0000 Subject: [PATCH 07/18] allow pad block --- README.md | 28 ++++------------------------ 1 file changed, 4 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index 4fab99430b..b8f37c9334 100644 --- a/README.md +++ b/README.md @@ -1519,36 +1519,16 @@ Other Style Guides return arr; ``` - - [18.8](#18.8) Do not pad your blocks with blank lines. - + - [18.8](#18.8) Do pad your blocks with blank lines. + ***** THIS RULE IS DIFFERENT TO AIRBNB ********* + ```javascript - // bad + // use your judgement to add padding to improve readability. function bar() { console.log(foo); } - - // also bad - if (baz) { - - console.log(qux); - } else { - console.log(foo); - - } - - // good - function bar() { - console.log(foo); - } - - // good - if (baz) { - console.log(qux); - } else { - console.log(foo); - } ``` From 361f72b873f7cc729a427150346920e8c9fdc1d1 Mon Sep 17 00:00:00 2001 From: Mike James Date: Tue, 10 Nov 2015 16:33:11 +0000 Subject: [PATCH 08/18] 2.1.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 504370f4f9..65a64e02df 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pebblecode-style", - "version": "2.0.0", + "version": "2.1.0", "description": "A mostly reasonable approach to JavaScript.", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", From c49999b974f3ab28dd016ec1db63616463a58920 Mon Sep 17 00:00:00 2001 From: Mike James Date: Tue, 10 Nov 2015 16:34:24 +0000 Subject: [PATCH 09/18] bump minor --- .gitignore | 1 + packages/eslint-config-pebblecode/package.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 3c3629e647..5171c54083 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ node_modules +npm-debug.log \ No newline at end of file diff --git a/packages/eslint-config-pebblecode/package.json b/packages/eslint-config-pebblecode/package.json index 942cec08c9..7a43e84533 100644 --- a/packages/eslint-config-pebblecode/package.json +++ b/packages/eslint-config-pebblecode/package.json @@ -1,6 +1,6 @@ { "name": "eslint-config-pebblecode", - "version": "1.1.0", + "version": "1.2.0", "description": "pebblecode's ESLint config, following our styleguide, fork of airbnb styleguide", "main": "index.js", "scripts": { From 80fa4eff6a613ebc14ebfd1afe4bcf1c9fa64237 Mon Sep 17 00:00:00 2001 From: Mike James Date: Tue, 10 Nov 2015 16:43:51 +0000 Subject: [PATCH 10/18] Allow generator functions and es7 bind syntax :: --- packages/eslint-config-pebblecode/package.json | 3 ++- packages/eslint-config-pebblecode/rules/es6.js | 4 ++-- packages/eslint-config-pebblecode/rules/legacy.js | 2 ++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/eslint-config-pebblecode/package.json b/packages/eslint-config-pebblecode/package.json index 7a43e84533..1212852997 100644 --- a/packages/eslint-config-pebblecode/package.json +++ b/packages/eslint-config-pebblecode/package.json @@ -42,7 +42,8 @@ "homepage": "https://github.com/pebblecode/javascript", "devDependencies": { "babel-tape-runner": "1.2.0", - "eslint": "^1.8.0", + "eslint": "^1.9.0", + "eslint-plugin-babel": "^2.1.1", "eslint-plugin-react": "^3.7.1", "react": "^0.13.3", "tape": "^4.2.2" diff --git a/packages/eslint-config-pebblecode/rules/es6.js b/packages/eslint-config-pebblecode/rules/es6.js index f192556a33..90522f8044 100644 --- a/packages/eslint-config-pebblecode/rules/es6.js +++ b/packages/eslint-config-pebblecode/rules/es6.js @@ -1,6 +1,6 @@ module.exports = { 'env': { - 'es6': false + 'es6': false // one to look at. }, 'ecmaFeatures': { 'arrowFunctions': true, @@ -9,7 +9,7 @@ module.exports = { 'defaultParams': true, 'destructuring': true, 'forOf': true, - 'generators': false, + 'generators': true, 'modules': true, 'objectLiteralComputedProperties': true, 'objectLiteralDuplicateProperties': false, diff --git a/packages/eslint-config-pebblecode/rules/legacy.js b/packages/eslint-config-pebblecode/rules/legacy.js index 1d0c518316..5f7b966c19 100644 --- a/packages/eslint-config-pebblecode/rules/legacy.js +++ b/packages/eslint-config-pebblecode/rules/legacy.js @@ -1,4 +1,6 @@ module.exports = { + 'parser': 'babel-eslint', + 'rules': { // specify the maximum depth that blocks can be nested 'max-depth': [0, 4], From 90230196789aa56a740c207f09c6cf674f9ba586 Mon Sep 17 00:00:00 2001 From: Mike James Date: Tue, 10 Nov 2015 16:44:25 +0000 Subject: [PATCH 11/18] 1.3.0 --- packages/eslint-config-pebblecode/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/eslint-config-pebblecode/package.json b/packages/eslint-config-pebblecode/package.json index 1212852997..6fd2b5a3c9 100644 --- a/packages/eslint-config-pebblecode/package.json +++ b/packages/eslint-config-pebblecode/package.json @@ -1,6 +1,6 @@ { "name": "eslint-config-pebblecode", - "version": "1.2.0", + "version": "1.3.0", "description": "pebblecode's ESLint config, following our styleguide, fork of airbnb styleguide", "main": "index.js", "scripts": { From e3c18c31261f7db1cc6437b3dcafa2b40c546128 Mon Sep 17 00:00:00 2001 From: Jaz Lalli Date: Tue, 10 Nov 2015 17:17:45 +0000 Subject: [PATCH 12/18] Update indent rule with SwitchCase indent level 1 --- packages/eslint-config-pebblecode/rules/style.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/eslint-config-pebblecode/rules/style.js b/packages/eslint-config-pebblecode/rules/style.js index 3f7e172801..1fb2c8db62 100644 --- a/packages/eslint-config-pebblecode/rules/style.js +++ b/packages/eslint-config-pebblecode/rules/style.js @@ -24,7 +24,7 @@ module.exports = { // this option enforces minimum and maximum identifier lengths (variable names, property names etc.) 'id-length': 0, // this option sets a specific tab width for your code - 'indent': [2, 2], + 'indent': [2, 2, {"SwitchCase": 1}], // specify whether double or single quotes should be used in JSX attributes 'jsx-quotes': 2, // enforces spacing between keys and values in object literal properties From 716167b3ebd389075c51258b2c63a68cdca0a058 Mon Sep 17 00:00:00 2001 From: Jaz Lalli Date: Tue, 10 Nov 2015 17:19:22 +0000 Subject: [PATCH 13/18] 2.2.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 65a64e02df..afbe4b20dd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pebblecode-style", - "version": "2.1.0", + "version": "2.2.0", "description": "A mostly reasonable approach to JavaScript.", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", From 1e971ca72af5901b88009a8dbdc11c82d20d3262 Mon Sep 17 00:00:00 2001 From: Jaz Lalli Date: Tue, 10 Nov 2015 17:22:31 +0000 Subject: [PATCH 14/18] Package version bump --- packages/eslint-config-pebblecode/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/eslint-config-pebblecode/package.json b/packages/eslint-config-pebblecode/package.json index 6fd2b5a3c9..e49b4f0673 100644 --- a/packages/eslint-config-pebblecode/package.json +++ b/packages/eslint-config-pebblecode/package.json @@ -1,6 +1,6 @@ { "name": "eslint-config-pebblecode", - "version": "1.3.0", + "version": "1.4.0", "description": "pebblecode's ESLint config, following our styleguide, fork of airbnb styleguide", "main": "index.js", "scripts": { From f7b601db48608f41585b38123f9d2c3710e3d5db Mon Sep 17 00:00:00 2001 From: Jaz Lalli Date: Tue, 10 Nov 2015 17:36:03 +0000 Subject: [PATCH 15/18] Contrib instructions in README --- packages/eslint-config-pebblecode/README.md | 23 ++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/packages/eslint-config-pebblecode/README.md b/packages/eslint-config-pebblecode/README.md index 762165aca0..145546c123 100644 --- a/packages/eslint-config-pebblecode/README.md +++ b/packages/eslint-config-pebblecode/README.md @@ -8,7 +8,7 @@ We export three ESLint configurations for your usage. ### eslint-config-pebblecode -Our default export contains all of our ESLint rules, including EcmaScript 6+ +Our default export contains all of our ESLint rules, including ES2015 and React. It requires `eslint` and `eslint-plugin-react`. 1. `npm install --save-dev eslint-config-pebblecode eslint-plugin-react eslint` @@ -16,7 +16,7 @@ and React. It requires `eslint` and `eslint-plugin-react`. ### eslint-config-pebblecode/base -Lints ES6+ but does not lint React. Requires `eslint`. +Lints ES2015 but does not lint React. Requires `eslint`. 1. `npm install --save-dev eslint-config-pebblecode eslint` 2. add `"extends": "pebblecode/base"` to your .eslintrc @@ -35,15 +35,32 @@ for more information. ## Improving this config Consider adding test cases if you're making complicated rules changes, like -anything involving regexes. Perhaps in a distant future, we could use literate +anything involving regexes. Perhaps in the distant future, we could use literate programming to structure our README as test cases for our .eslintrc? You can run tests with `npm test`. You can make sure this module lints with itself using `npm run lint`. +## Contributing + +In order to modify this package, you need to clone this repo. + +1. Make the changes you wish, including tests +2. Try out the updated rules locally by installing from local dir +3. Submit a PR back to the repo, or if you're flying by the seat of your pants, `GOTO 4` +4. `npm version minor` +5. `npm login` then `npm publish` +6. Commit and push your changes back to the repo + ## Changelog +### 1.4.0 +- modify indent rule to include `{SwitchCase: 1}` + +### 1.3.0 +- add babel-eslint as default parser + ### 1.0.0 - require `eslint` `v1.0.0` or higher - removes `babel-eslint` dependency From c5e8800771d230b253fea6a5594c158b1bfce507 Mon Sep 17 00:00:00 2001 From: Mike James Date: Wed, 11 Nov 2015 10:04:37 +0000 Subject: [PATCH 16/18] link to packages/ readme --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b8f37c9334..1dca205347 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,9 @@ *A mostly reasonable approach to JavaScript* [![Downloads](https://img.shields.io/npm/dm/eslint-config-pebblecode.svg)](https://www.npmjs.com/package/eslint-config-pebblecode) -[![Gitter](https://badges.gitter.im/Join Chat.svg)](https://gitter.im/pebblecode/javascript?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) +[![Gitter](https://badges.gitter.im/Join Chat.svg)](https://gitter.im/airbnb/javascript?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) + +** Making Updates? [See here](./packages/eslint-config-pebblecode/README.md)** Other Style Guides - [ES5](es5/) From d761f0143be651d6635188feb71b06c91958d04d Mon Sep 17 00:00:00 2001 From: Mike James Date: Wed, 11 Nov 2015 16:07:47 +0000 Subject: [PATCH 17/18] allow use strict in node env --- packages/eslint-config-pebblecode/README.md | 2 +- packages/eslint-config-pebblecode/rules/node.js | 2 +- packages/eslint-config-pebblecode/rules/strict.js | 4 ++-- packages/eslint-config-pebblecode/test/test-react-order.js | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/eslint-config-pebblecode/README.md b/packages/eslint-config-pebblecode/README.md index 145546c123..5ebc00f0f0 100644 --- a/packages/eslint-config-pebblecode/README.md +++ b/packages/eslint-config-pebblecode/README.md @@ -14,7 +14,7 @@ and React. It requires `eslint` and `eslint-plugin-react`. 1. `npm install --save-dev eslint-config-pebblecode eslint-plugin-react eslint` 2. add `"extends": "pebblecode"` to your .eslintrc -### eslint-config-pebblecode/base +### eslint-config-pebblecode/basestrict Lints ES2015 but does not lint React. Requires `eslint`. diff --git a/packages/eslint-config-pebblecode/rules/node.js b/packages/eslint-config-pebblecode/rules/node.js index b3e43522f7..13c0080fd6 100644 --- a/packages/eslint-config-pebblecode/rules/node.js +++ b/packages/eslint-config-pebblecode/rules/node.js @@ -19,6 +19,6 @@ module.exports = { // restrict usage of specified node modules 'no-restricted-modules': 0, // disallow use of synchronous methods (off by default) - 'no-sync': 0 + 'no-sync': 0. } }; diff --git a/packages/eslint-config-pebblecode/rules/strict.js b/packages/eslint-config-pebblecode/rules/strict.js index 6d32f8ca59..3cf2ccba01 100644 --- a/packages/eslint-config-pebblecode/rules/strict.js +++ b/packages/eslint-config-pebblecode/rules/strict.js @@ -1,6 +1,6 @@ module.exports = { 'rules': { - // babel inserts `'use strict';` for us - 'strict': [2, 'never'] + // babel inserts `'use strict';` for us but we also run node without babel so strict is allowed. + 'strict': 0 } }; diff --git a/packages/eslint-config-pebblecode/test/test-react-order.js b/packages/eslint-config-pebblecode/test/test-react-order.js index 1a84b59230..77c4b6c1b9 100644 --- a/packages/eslint-config-pebblecode/test/test-react-order.js +++ b/packages/eslint-config-pebblecode/test/test-react-order.js @@ -20,9 +20,9 @@ function lint(text) { function wrapComponent(body) { return ` -import React from 'react'; -export default class MyComponent extends React.Component { -${body} + import React from 'react'; + export default class MyComponent extends React.Component { + ${body} } `; } From 9921147ee2e46f0672da5eaa1b0cc2644d104844 Mon Sep 17 00:00:00 2001 From: Mike James Date: Wed, 11 Nov 2015 16:09:27 +0000 Subject: [PATCH 18/18] 1.5.0 --- packages/eslint-config-pebblecode/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/eslint-config-pebblecode/package.json b/packages/eslint-config-pebblecode/package.json index e49b4f0673..0962e2b862 100644 --- a/packages/eslint-config-pebblecode/package.json +++ b/packages/eslint-config-pebblecode/package.json @@ -1,6 +1,6 @@ { "name": "eslint-config-pebblecode", - "version": "1.4.0", + "version": "1.5.0", "description": "pebblecode's ESLint config, following our styleguide, fork of airbnb styleguide", "main": "index.js", "scripts": {