Skip to content

Commit 4aa3f9c

Browse files
committed
Initial commit
0 parents  commit 4aa3f9c

File tree

10 files changed

+8304
-0
lines changed

10 files changed

+8304
-0
lines changed

.editorconfig

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# This file is for unifying the coding style for different editors and IDEs
2+
# editorconfig.org
3+
4+
root = true
5+
6+
[package.json]
7+
indent_style = space
8+
indent_size = 2
9+
end_of_line = lf
10+
charset = utf-8
11+
trim_trailing_whitespace = true
12+
insert_final_newline = true
13+
14+
[*.js]
15+
indent_style = tab

.eslintrc

Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
{
2+
"rules": {
3+
"no-cond-assign": [
4+
"error",
5+
"except-parens"
6+
],
7+
"curly": [
8+
"error",
9+
"all"
10+
],
11+
"object-curly-spacing": [
12+
"error",
13+
"always"
14+
],
15+
"computed-property-spacing": [
16+
"error",
17+
"always"
18+
],
19+
"array-bracket-spacing": [
20+
"error",
21+
"always"
22+
],
23+
"eqeqeq": [
24+
"error",
25+
"smart"
26+
],
27+
28+
// Shows errors where jshint wouldn't (see jshint "expr" rule)
29+
// clarifing this with eslint team
30+
// "no-unused-expressions": "error",
31+
"wrap-iife": [
32+
"error",
33+
"inside"
34+
],
35+
"no-caller": "error",
36+
"quotes": [
37+
"error",
38+
"double",
39+
"avoid-escape"
40+
],
41+
"no-undef": "error",
42+
"no-unused-vars": "error",
43+
"operator-linebreak": [
44+
"error",
45+
"after"
46+
],
47+
"comma-style": [
48+
"error",
49+
"last"
50+
],
51+
"camelcase": [
52+
"error",
53+
{
54+
"properties": "never"
55+
}
56+
],
57+
"dot-notation": [
58+
"error",
59+
{
60+
"allowPattern": "^[a-z]+(_[a-z]+)+$"
61+
}
62+
],
63+
"max-len": [
64+
"error",
65+
{
66+
"code": 100,
67+
"ignoreComments": true
68+
}
69+
],
70+
"no-mixed-spaces-and-tabs": "error",
71+
"no-trailing-spaces": "error",
72+
"no-multi-str": "error",
73+
"comma-dangle": [
74+
"error",
75+
"never"
76+
],
77+
"comma-spacing": [
78+
"error",
79+
{
80+
"before": false,
81+
"after": true
82+
}
83+
],
84+
"space-before-blocks": [
85+
"error",
86+
"always"
87+
],
88+
"space-in-parens": [
89+
"error",
90+
"always"
91+
],
92+
"keyword-spacing": [
93+
2
94+
],
95+
"semi": [
96+
"error",
97+
"always"
98+
],
99+
"semi-spacing": [
100+
"error",
101+
{
102+
// Because of the `for ( ; ...)` requirement
103+
// "before": true,
104+
"after": true
105+
}
106+
],
107+
"space-infix-ops": "error",
108+
"eol-last": "error",
109+
"lines-around-comment": [
110+
"error",
111+
{
112+
"beforeLineComment": true
113+
}
114+
],
115+
"linebreak-style": [
116+
"error",
117+
"unix"
118+
],
119+
"no-with": "error",
120+
"brace-style": "error",
121+
"space-before-function-paren": [
122+
"error",
123+
"never"
124+
],
125+
"no-loop-func": "error",
126+
"no-spaced-func": "error",
127+
"key-spacing": [
128+
"error",
129+
{
130+
"beforeColon": false,
131+
"afterColon": true
132+
}
133+
],
134+
"space-unary-ops": [
135+
"error",
136+
{
137+
"words": false,
138+
"nonwords": false
139+
}
140+
],
141+
"no-multiple-empty-lines": 2
142+
}
143+
}

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/node_modules
2+
npm-debug.log

.travis.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
language: node_js
2+
node_js:
3+
- "0.10"
4+
- "0.12"
5+
- "4"
6+
- "5"
7+
- "6"

license

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright jQuery Foundation and other contributors, https://jquery.org/
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all 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,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.

package.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"name": "eslint-config-jquery",
3+
"version": "1.0.0",
4+
"description": "jQuery eslint config",
5+
"main": "index.js",
6+
"scripts": {
7+
"test": "eslint test/fixtures/core.js"
8+
},
9+
"repository": {
10+
"type": "git",
11+
"url": "eslint-config-jquery"
12+
},
13+
"homepage": "https://contribute.jquery.org/style-guide/js/",
14+
"issues": "https://github.com/jquery/eslint-config-jquery/issues",
15+
"keywords": [
16+
"style guide",
17+
"eslint",
18+
"config",
19+
"lint",
20+
"jquery"
21+
],
22+
"files": [
23+
".eslintrc"
24+
],
25+
"author": "Gaidarenko Oleg <markelog@gmail.com>",
26+
"license": "MIT",
27+
"devDependencies": {
28+
"eslint": "^2.11.1"
29+
}
30+
}

readme.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
[![Build Status](https://travis-ci.org/jquery/jquery-eslint-config.svg)](https://travis-ci.org/jquery/jquery-eslint-config)
2+
3+
# jQuery eslint config
4+
5+
## Usage
6+
7+
```sh
8+
npm install --save-dev jquery-eslint-config
9+
```
10+
11+
Configure ESLint with a `.eslintrc` file using the following contents:
12+
```json
13+
{
14+
"extends": "jquery"
15+
}
16+
```
17+
18+
## Proposing changes
19+
20+
Over time, ESLint implements new rules, alter existing ones, and retire old ones. Changes to the jQuery config should be made as pull requests to this repo, with issues raised on jQuery contibute [repository](https://github.com/jquery/contribute.jquery.org/issues).

test/fixtures/.eslintrc

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
globals:
2+
define: true
3+
window: true
4+
module: true
5+
6+
extends: ../../.eslintrc
7+
8+
root: true
9+
10+
rules:
11+
// For builded version
12+
// TODO: do not use builded version to check the code
13+
lines-around-comment: "off"
14+
no-multiple-empty-lines: "off"

0 commit comments

Comments
 (0)