Skip to content

Commit 5dd3cf6

Browse files
committed
init
0 parents  commit 5dd3cf6

18 files changed

+4176
-0
lines changed

.editorconfig

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
indent_style = space
6+
indent_size = 2
7+
end_of_line = lf
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

.travis.yml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
language: node_js
2+
node_js:
3+
- '6'
4+
- '5'
5+
- '4'

LICENSE

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
The MIT License (MIT)
2+
3+
Copyright 2017 O2Team
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy of
6+
this software and associated documentation files (the "Software"), to deal in
7+
the Software without restriction, including without limitation the rights to
8+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9+
the Software, and to permit persons to whom the Software is furnished to do so,
10+
subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

README.md

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
2+
# eslint-config-o2team [![Build Status](https://travis-ci.org/o2team/eslint-config-o2team.svg?branch=master)](https://travis-ci.org/o2team/eslint-config-o2team)
3+
4+
> ESLint [Shareable Config](http://eslint.org/docs/developer-guide/shareable-configs.html) for the O2Team Javascript Style Guide
5+
6+
7+
## Installation
8+
9+
```
10+
$ npm install --save-dev eslint eslint-config-o2team
11+
```
12+
13+
14+
## Usage
15+
16+
### eslint-config-o2team
17+
18+
Once the `eslint-config-o2team` package is installed, you can use it by specifying `o2team` in the `extends` section of your [ESLint configuration](http://eslint.org/docs/user-guide/configuring).
19+
20+
```js
21+
{
22+
"extends": "o2team",
23+
"rules": {
24+
// Additional, per-project rules...
25+
}
26+
}
27+
```
28+
29+
Or you can specifying `eslint-config-o2team` in the `eslintConfig` section of your `package.json`
30+
31+
```json
32+
{
33+
"eslintConfig": {
34+
"extends": "eslint-config-o2team"
35+
}
36+
}
37+
```
38+
39+
### eslint-config-o2team/legacy
40+
41+
Maybe some legacy projects use `ES5` and below.
42+
43+
```js
44+
{
45+
"extends": "o2team/legacy",
46+
"rules": {
47+
// Additional, per-project rules...
48+
}
49+
}
50+
```
51+
52+
## [License](LICENSE)

index.js

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
module.exports = {
2+
extends: [
3+
'./rules/best-practices',
4+
'./rules/errors',
5+
'./rules/node',
6+
'./rules/strict',
7+
'./rules/style',
8+
'./rules/variables',
9+
'./rules/es6'
10+
].map(require.resolve),
11+
parserOptions: {
12+
ecmaVersion: 8,
13+
sourceType: 'module'
14+
}
15+
}

legacy.js

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
module.exports = {
2+
extends: [
3+
'./rules/best-practices',
4+
'./rules/errors',
5+
'./rules/node',
6+
'./rules/style',
7+
'./rules/variables'
8+
].map(require.resolve),
9+
env: {
10+
browser: true,
11+
node: true,
12+
amd: false,
13+
mocha: false,
14+
jasmine: false
15+
}
16+
}

package.json

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"name": "eslint-config-o2team",
3+
"version": "0.1.0",
4+
"description": "ESLint Shareable Config for the O2Team Javascript Style Guide",
5+
"main": "index.js",
6+
"scripts": {
7+
"test": "ava test/*.js"
8+
},
9+
"files": [
10+
"index.js",
11+
"legacy.js"
12+
],
13+
"repository": "o2team/eslint-config-o2team",
14+
"keywords": [
15+
"eslint",
16+
"eslint-config",
17+
"o2team"
18+
],
19+
"author": "O2Team",
20+
"license": "MIT",
21+
"bugs": {
22+
"url": "https://github.com/o2team/eslint-config-o2team/issues"
23+
},
24+
"homepage": "https://github.com/o2team/eslint-config-o2team",
25+
"devDependencies": {
26+
"ava": "^0.18.2",
27+
"eslint": "^3.18.0"
28+
},
29+
"peerDependencies": {
30+
"eslint": ">=3.18.0"
31+
}
32+
}

0 commit comments

Comments
 (0)