Skip to content

Commit b12507c

Browse files
committed
add esline
1 parent f6ef3da commit b12507c

File tree

12 files changed

+73
-226
lines changed

12 files changed

+73
-226
lines changed

.editorconfig

+3-7
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
1-
# http://editorconfig.org/
1+
# See editorconfig.org
22
root = true
33

44
[*]
55
charset = utf-8
66
end_of_line = lf
7-
indent_size = 2
7+
indent_size = 4
88
indent_style = space
99
insert_final_newline = true
10-
trim_trailing_whitespace = true
11-
12-
[{**/{actual,fixtures,expected,templates}/**,*.md}]
13-
trim_trailing_whitespace = false
14-
insert_final_newline = false
10+
trim_trailing_whitespace = true

.eslintrc

+30-211
Original file line numberDiff line numberDiff line change
@@ -1,216 +1,35 @@
11
{
2-
"root": true,
3-
"parserOptions": {
4-
"ecmaVersion": 2018,
5-
"sourceType": "module",
6-
"ecmaFeatures": {
7-
"jsx": true,
8-
"globalReturn": true,
9-
"impliedStrict": true
10-
}
11-
},
2+
"parser": "babel-eslint",
3+
"extends": ["airbnb-base", "prettier"],
124
"env": {
13-
"es6": true,
14-
"amd": true,
15-
"node": true,
16-
"mocha": true,
17-
"worker": true,
18-
"jquery": true,
19-
"browser": true,
20-
"commonjs": true,
21-
"serviceworker": true,
22-
"shared-node-browser": true
5+
"browser": true,
6+
"es6": true
7+
},
8+
"globals": {
9+
"Artplayer": false,
10+
"jQuery": false
2311
},
2412
"rules": {
25-
"no-await-in-loop": 2,
26-
"no-compare-neg-zero": 2,
27-
"no-cond-assign": 2,
28-
"no-console": 0,
29-
"no-constant-condition": [2, { "checkLoops": false }],
30-
"no-debugger": 2,
31-
"no-dupe-args": 2,
32-
"no-dupe-keys": 2,
33-
"no-duplicate-case": 2,
34-
"no-empty": 1,
35-
"no-empty-character-class": 2,
36-
"no-ex-assign": 2,
37-
"no-extra-boolean-cast": 2,
38-
"no-extra-parens": 2,
39-
"no-extra-semi": 2,
40-
"no-func-assign": 2,
41-
"no-inner-declarations": 2,
42-
"no-invalid-regexp": 2,
43-
"no-irregular-whitespace": 2,
44-
"no-obj-calls": 2,
45-
"no-regex-spaces": 1,
46-
"no-sparse-arrays": 2,
47-
"no-template-curly-in-string": 2,
48-
"no-unexpected-multiline": 2,
49-
"no-unreachable": 2,
50-
"no-unsafe-finally": 2,
51-
"no-unsafe-negation": 2,
52-
"use-isnan": 2,
53-
"valid-jsdoc": [2, { "requireReturn": false }],
54-
"valid-typeof": 2,
55-
56-
"accessor-pairs": 1,
57-
"array-callback-return": 1,
58-
"block-scoped-var": 1,
59-
"class-methods-use-this": 0,
60-
"curly": 1,
61-
"default-case": 1,
62-
"dot-location": [1, "property"],
63-
"eqeqeq": [1, "smart"],
64-
"guard-for-in": 1,
65-
"no-alert": 2,
66-
"no-caller": 1,
67-
"no-div-regex": 1,
68-
"no-else-return": 1,
69-
"no-empty-function": 1,
70-
"no-empty-pattern": 1,
71-
"no-eq-null": 1,
72-
"no-eval": 0,
73-
"no-extend-native": 2,
74-
"no-extra-bind": 1,
75-
"no-extra-label": 1,
76-
"no-fallthrough": 1,
77-
"no-floating-decimal": 1,
78-
"no-global-assign": 2,
79-
"no-implicit-coercion": 1,
80-
"no-implied-eval": 2,
81-
"no-invalid-this": 1,
82-
"no-iterator": 2,
83-
"no-labels": 1,
84-
"no-lone-blocks": 1,
85-
"no-loop-func": 2,
86-
"no-multi-spaces": 1,
87-
"no-multi-str": 1,
88-
"no-new-func": 0,
89-
"no-new-wrappers": 1,
90-
"no-octal": 1,
91-
"no-octal-escape": 1,
92-
"no-param-reassign": 1,
93-
"no-proto": 1,
94-
"no-redeclare": 1,
95-
"no-return-assign": 1,
96-
"no-return-await": 1,
97-
"no-script-url": 2,
98-
"no-self-assign": 1,
99-
"no-self-compare": 1,
100-
"no-sequences": 1,
101-
"no-throw-literal": 1,
102-
"no-unmodified-loop-condition": 1,
103-
"no-unused-expressions": 0,
104-
"no-unused-labels": 1,
105-
"no-useless-call": 1,
106-
"no-useless-concat": 1,
107-
"no-useless-escape": 1,
108-
"no-useless-return": 1,
109-
"no-void": 1,
110-
"no-with": 2,
111-
"prefer-promise-reject-errors": 1,
112-
"require-await": 2,
113-
"vars-on-top": 1,
114-
"wrap-iife": [1, "any"],
115-
"yoda": 2,
116-
117-
"strict": 2,
118-
119-
"no-catch-shadow": 2,
120-
"no-delete-var": 2,
121-
"no-label-var": 2,
122-
"no-shadow": 2,
123-
"no-shadow-restricted-names": 2,
124-
"no-undef": 2,
125-
"no-undef-init": 2,
126-
"no-undefined": 0,
127-
"no-unused-vars": 2,
128-
"no-use-before-define": 2,
129-
130-
"callback-return": 0,
131-
"global-require": 1,
132-
"handle-callback-err": 1,
133-
"no-mixed-requires": [1, { "allowCall": true }],
134-
"no-new-require": 2,
135-
"no-path-concat": 2,
136-
"no-process-env": 0,
137-
"no-process-exit": 2,
138-
139-
"array-bracket-spacing": 1,
140-
"block-spacing": 1,
141-
"brace-style": 1,
142-
"camelcase": 1,
143-
"capitalized-comments": 0,
144-
"comma-dangle": 1,
145-
"comma-spacing": 1,
146-
"comma-style": 1,
147-
"computed-property-spacing": 1,
148-
"consistent-this": [1, "that", "self"],
149-
"eol-last": 1,
150-
"func-call-spacing": 1,
151-
"func-names": 1,
152-
"indent": [1, 2, { "SwitchCase": 1 }],
153-
"key-spacing": 1,
154-
"keyword-spacing": 1,
155-
"linebreak-style": 1,
156-
"lines-around-comment": 1,
157-
"new-cap": 0,
158-
"new-parens": 1,
159-
"no-array-constructor": 1,
160-
"no-continue": 1,
161-
"no-inline-comments": 1,
162-
"no-mixed-spaces-and-tabs": 2,
163-
"no-multi-assign": 1,
164-
"no-multiple-empty-lines": 1,
165-
"no-negated-condition": 0,
166-
"no-nested-ternary": 2,
167-
"no-new-object": 1,
168-
"no-tabs": 2,
169-
"no-trailing-spaces": 1,
170-
"no-unneeded-ternary": 1,
171-
"no-whitespace-before-property": 1,
172-
"object-curly-spacing": 0,
173-
"object-property-newline": [1, { "allowMultiplePropertiesPerLine": true }],
174-
"one-var": [1, "never"],
175-
"operator-assignment": 1,
176-
"operator-linebreak": 1,
177-
"padded-blocks": 0,
178-
"quotes": [1, "single"],
179-
"require-jsdoc": 0,
180-
"semi": 1,
181-
"semi-spacing": 1,
182-
"space-before-blocks": 1,
183-
"space-before-function-paren": [1, "never"],
184-
"space-in-parens": 1,
185-
"space-infix-ops": 1,
186-
"space-unary-ops": [1, { "words": true, "nonwords": false }],
187-
"spaced-comment": [1, "always"],
188-
"wrap-regex": 1,
189-
190-
"arrow-body-style": 1,
191-
"arrow-parens": 0,
192-
"arrow-spacing": 1,
193-
"constructor-super": 2,
194-
"generator-star-spacing": 1,
195-
"no-class-assign": 2,
196-
"no-confusing-arrow": 0,
197-
"no-const-assign": 2,
198-
"no-dupe-class-members": 2,
199-
"no-duplicate-imports": 2,
200-
"no-new-symbol": 1,
201-
"no-this-before-super": 2,
202-
"no-useless-computed-key": 1,
203-
"no-useless-constructor": 1,
204-
"no-useless-rename": 1,
205-
"no-var": 1,
206-
"prefer-const": 1,
207-
"prefer-destructuring": 1,
208-
"prefer-spread": 0,
209-
"prefer-template": 1,
210-
"require-yield": 2,
211-
"rest-spread-spacing": 1,
212-
"symbol-description": 2,
213-
"template-curly-spacing": 1,
214-
"yield-star-spacing": 1
13+
"import/no-cycle": 1,
14+
"no-const-assign": 1,
15+
"no-shadow": 0,
16+
"no-this-before-super": 1,
17+
"no-undef": 1,
18+
"no-unreachable": 1,
19+
"no-unused-vars": 1,
20+
"constructor-super": 1,
21+
"valid-typeof": 1,
22+
"indent": [2, 4, { "SwitchCase": 1 }],
23+
"quotes": [2, "single", "avoid-escape"],
24+
"semi": [2, "always"],
25+
"eqeqeq": [2, "always"],
26+
"one-var": [2, "never"],
27+
"comma-dangle": [2, "always-multiline"],
28+
"spaced-comment": [2, "always"],
29+
"no-restricted-globals": 2,
30+
"no-param-reassign": [2, { "props": false }]
31+
},
32+
"parserOptions": {
33+
"sourceType": "module"
21534
}
216-
}
35+
}

.prettierrc

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"useTabs": false,
3+
"tabWidth": 4,
4+
"singleQuote": true,
5+
"trailingComma": "all",
6+
"printWidth": 120
7+
}

.travis.yml

+7
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
11
language: node_js
2+
23
node_js:
34
- stable
5+
6+
before_script:
7+
- npm install
8+
9+
script:
10+
- npm run lint

changelog.md

Whitespace-only changes.

package.json

+9-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@
44
"description": "ArtPlayer is a modern HTML5 video player",
55
"scripts": {
66
"bootstrap": "lerna bootstrap",
7-
"publish": "lerna publish"
7+
"publish": "lerna publish",
8+
"build": "lerna run build",
9+
"test": "lerna run test",
10+
"lint": "eslint packages/*/src"
811
},
912
"repository": {
1013
"type": "git",
@@ -21,6 +24,11 @@
2124
},
2225
"homepage": "https://github.com/zhw2590582/ArtPlayer#readme",
2326
"devDependencies": {
27+
"babel-eslint": "^10.0.1",
28+
"eslint": "^5.9.0",
29+
"eslint-config-airbnb-base": "^13.1.0",
30+
"eslint-config-prettier": "^3.3.0",
31+
"eslint-plugin-import": "^2.14.0",
2432
"lerna": "^3.4.3"
2533
}
2634
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.artplayerPluginDanmu{display:flex}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/*!
2+
* artplayer-plugin-danmu.js v1.0.2
3+
* Github: https://github.com/zhw2590582/ArtPlayer#readme
4+
* (c) 2017-2018 Harvey Zack
5+
* Released under the MIT License.
6+
*/
7+
8+
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n(e["artplayer-plugin-danmu"]={})}(this,function(e){"use strict";var n=function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")},t=function e(){n(this,e),console.log(this)};window.ArtplayerPluginDanmu=t,e.default=t,Object.defineProperty(e,"__esModule",{value:!0})});

packages/artplayer-plugin-danmu/src/index.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import './style/index.scss';
22

33
class ArtplayerPluginDanmu {
4-
constructor() {
5-
console.log(this);
6-
}
4+
constructor() {
5+
console.log(this);
6+
}
77
}
88

99
window.ArtplayerPluginDanmu = ArtplayerPluginDanmu;

0 commit comments

Comments
 (0)