Skip to content

Commit 8980831

Browse files
mohe2015henrikingo
authored andcommitted
Update dependencies and remove outdated ones (impress#722)
* Update dependencies and remove outdated ones * Add package lock file * Add minified file * Karma now uses headless browser to run QUnit * Add to readme that node and npm install is required * Update license info * Add lint-new but don't use it in CI yet
1 parent 97546a5 commit 8980831

14 files changed

+5234
-207
lines changed

.circleci/config.yml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
version: 2
2+
jobs:
3+
build:
4+
working_directory: ~/impress.js
5+
docker:
6+
- image: circleci/node:current-browsers
7+
steps:
8+
- checkout
9+
- run:
10+
name: update-npm
11+
command: 'sudo npm install -g npm@latest'
12+
- restore_cache:
13+
key: dependency-cache-{{ checksum "package.json" }}
14+
- run:
15+
name: install-npm
16+
command: npm install
17+
- save_cache:
18+
key: dependency-cache-{{ checksum "package.json" }}
19+
paths:
20+
- ./node_modules
21+
- run:
22+
name: build
23+
command: npm run build
24+
- run:
25+
name: lint
26+
command: npm run lint
27+
- run:
28+
name: test
29+
command: npm test

.eslintrc.js

+296
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,296 @@
1+
module.exports = {
2+
"env": {
3+
"browser": true,
4+
"es6": true
5+
},
6+
"extends": "eslint:recommended",
7+
"globals": {
8+
"Atomics": "readonly",
9+
"SharedArrayBuffer": "readonly"
10+
},
11+
"parserOptions": {
12+
"ecmaVersion": 2018
13+
},
14+
"rules": {
15+
"accessor-pairs": "error",
16+
"array-bracket-newline": "error",
17+
"array-bracket-spacing": "error",
18+
"array-callback-return": "error",
19+
"array-element-newline": "error",
20+
"arrow-body-style": "error",
21+
"arrow-parens": "error",
22+
"arrow-spacing": "error",
23+
"block-scoped-var": "off",
24+
"block-spacing": [
25+
"error",
26+
"always"
27+
],
28+
"brace-style": [
29+
"error",
30+
"1tbs",
31+
{
32+
"allowSingleLine": true
33+
}
34+
],
35+
"callback-return": "error",
36+
"camelcase": "error",
37+
"capitalized-comments": "off",
38+
"class-methods-use-this": "error",
39+
"comma-dangle": "error",
40+
"comma-spacing": [
41+
"error",
42+
{
43+
"after": true,
44+
"before": false
45+
}
46+
],
47+
"comma-style": [
48+
"error",
49+
"last"
50+
],
51+
"complexity": "error",
52+
"computed-property-spacing": [
53+
"error",
54+
"always"
55+
],
56+
"consistent-return": "error",
57+
"consistent-this": "off",
58+
"curly": "error",
59+
"default-case": "error",
60+
"dot-location": "error",
61+
"dot-notation": "error",
62+
"eol-last": "error",
63+
"eqeqeq": "error",
64+
"func-call-spacing": "error",
65+
"func-name-matching": "error",
66+
"func-names": "off",
67+
"func-style": [
68+
"error",
69+
"expression"
70+
],
71+
"function-paren-newline": "error",
72+
"generator-star-spacing": "error",
73+
"global-require": "error",
74+
"guard-for-in": "error",
75+
"handle-callback-err": "error",
76+
"id-blacklist": "error",
77+
"id-length": "off",
78+
"id-match": "error",
79+
"implicit-arrow-linebreak": "error",
80+
"indent": "error",
81+
"indent-legacy": "error",
82+
"init-declarations": "off",
83+
"jsx-quotes": "error",
84+
"key-spacing": "off",
85+
"keyword-spacing": [
86+
"error",
87+
{
88+
"after": true,
89+
"before": true
90+
}
91+
],
92+
"line-comment-position": "off",
93+
"linebreak-style": [
94+
"error",
95+
"unix"
96+
],
97+
"lines-around-comment": "error",
98+
"lines-around-directive": "off",
99+
"lines-between-class-members": "error",
100+
"max-classes-per-file": "error",
101+
"max-depth": "error",
102+
"max-len": "off",
103+
"max-lines": "error",
104+
"max-lines-per-function": "off",
105+
"max-nested-callbacks": "error",
106+
"max-params": "error",
107+
"max-statements": "off",
108+
"max-statements-per-line": "off",
109+
"multiline-comment-style": [
110+
"error",
111+
"separate-lines"
112+
],
113+
"new-cap": "error",
114+
"new-parens": "error",
115+
"newline-after-var": "off",
116+
"newline-before-return": "off",
117+
"newline-per-chained-call": "error",
118+
"no-alert": "error",
119+
"no-array-constructor": "error",
120+
"no-async-promise-executor": "error",
121+
"no-await-in-loop": "error",
122+
"no-bitwise": "error",
123+
"no-buffer-constructor": "error",
124+
"no-caller": "error",
125+
"no-catch-shadow": "error",
126+
"no-confusing-arrow": "error",
127+
"no-continue": "error",
128+
"no-div-regex": "error",
129+
"no-duplicate-imports": "error",
130+
"no-else-return": "error",
131+
"no-empty-function": "error",
132+
"no-eq-null": "error",
133+
"no-eval": "error",
134+
"no-extend-native": "error",
135+
"no-extra-bind": "error",
136+
"no-extra-label": "error",
137+
"no-extra-parens": "off",
138+
"no-floating-decimal": "error",
139+
"no-implicit-coercion": "error",
140+
"no-implicit-globals": "error",
141+
"no-implied-eval": "error",
142+
"no-inline-comments": "off",
143+
"no-inner-declarations": [
144+
"error",
145+
"functions"
146+
],
147+
"no-invalid-this": "off",
148+
"no-iterator": "error",
149+
"no-label-var": "error",
150+
"no-labels": "error",
151+
"no-lone-blocks": "error",
152+
"no-lonely-if": "error",
153+
"no-loop-func": "error",
154+
"no-magic-numbers": "off",
155+
"no-misleading-character-class": "error",
156+
"no-mixed-operators": "error",
157+
"no-mixed-requires": "error",
158+
"no-multi-assign": "error",
159+
"no-multi-spaces": "off",
160+
"no-multi-str": "error",
161+
"no-multiple-empty-lines": "error",
162+
"no-native-reassign": "error",
163+
"no-negated-condition": "off",
164+
"no-negated-in-lhs": "error",
165+
"no-nested-ternary": "error",
166+
"no-new": "error",
167+
"no-new-func": "error",
168+
"no-new-object": "error",
169+
"no-new-require": "error",
170+
"no-new-wrappers": "error",
171+
"no-octal-escape": "error",
172+
"no-param-reassign": "off",
173+
"no-path-concat": "error",
174+
"no-plusplus": "off",
175+
"no-process-env": "error",
176+
"no-process-exit": "error",
177+
"no-proto": "error",
178+
"no-prototype-builtins": "error",
179+
"no-restricted-globals": "error",
180+
"no-restricted-imports": "error",
181+
"no-restricted-modules": "error",
182+
"no-restricted-properties": "error",
183+
"no-restricted-syntax": "error",
184+
"no-return-assign": "error",
185+
"no-return-await": "error",
186+
"no-script-url": "error",
187+
"no-self-compare": "error",
188+
"no-sequences": "error",
189+
"no-shadow": "off",
190+
"no-shadow-restricted-names": "error",
191+
"no-spaced-func": "error",
192+
"no-sync": "error",
193+
"no-tabs": "error",
194+
"no-template-curly-in-string": "error",
195+
"no-ternary": "off",
196+
"no-throw-literal": "error",
197+
"no-trailing-spaces": "error",
198+
"no-undef-init": "error",
199+
"no-undefined": "off",
200+
"no-underscore-dangle": "error",
201+
"no-unmodified-loop-condition": "error",
202+
"no-unneeded-ternary": "error",
203+
"no-unused-expressions": "error",
204+
"no-use-before-define": "off",
205+
"no-useless-call": "error",
206+
"no-useless-catch": "error",
207+
"no-useless-computed-key": "error",
208+
"no-useless-concat": "error",
209+
"no-useless-constructor": "error",
210+
"no-useless-rename": "error",
211+
"no-useless-return": "error",
212+
"no-var": "off",
213+
"no-void": "error",
214+
"no-warning-comments": "error",
215+
"no-whitespace-before-property": "error",
216+
"no-with": "error",
217+
"nonblock-statement-body-position": "error",
218+
"object-curly-newline": "error",
219+
"object-curly-spacing": [
220+
"error",
221+
"always"
222+
],
223+
"object-shorthand": "off",
224+
"one-var": "off",
225+
"one-var-declaration-per-line": "off",
226+
"operator-assignment": "error",
227+
"operator-linebreak": "error",
228+
"padded-blocks": "off",
229+
"padding-line-between-statements": "error",
230+
"prefer-arrow-callback": "off",
231+
"prefer-const": "error",
232+
"prefer-destructuring": "off",
233+
"prefer-numeric-literals": "error",
234+
"prefer-object-spread": "error",
235+
"prefer-promise-reject-errors": "error",
236+
"prefer-reflect": "off",
237+
"prefer-rest-params": "off",
238+
"prefer-spread": "error",
239+
"prefer-template": "off",
240+
"quote-props": "off",
241+
"quotes": [
242+
"error",
243+
"double"
244+
],
245+
"radix": "error",
246+
"require-atomic-updates": "error",
247+
"require-await": "error",
248+
"require-jsdoc": "error",
249+
"require-unicode-regexp": "off",
250+
"rest-spread-spacing": "error",
251+
"semi": "error",
252+
"semi-spacing": [
253+
"error",
254+
{
255+
"after": true,
256+
"before": false
257+
}
258+
],
259+
"semi-style": [
260+
"error",
261+
"last"
262+
],
263+
"sort-imports": "error",
264+
"sort-keys": "off",
265+
"sort-vars": "off",
266+
"space-before-blocks": "error",
267+
"space-before-function-paren": "off",
268+
"space-in-parens": [
269+
"error",
270+
"always"
271+
],
272+
"space-infix-ops": "error",
273+
"space-unary-ops": "error",
274+
"spaced-comment": [
275+
"error",
276+
"always"
277+
],
278+
"strict": "error",
279+
"switch-colon-spacing": "error",
280+
"symbol-description": "error",
281+
"template-curly-spacing": "error",
282+
"template-tag-spacing": "error",
283+
"unicode-bom": [
284+
"error",
285+
"never"
286+
],
287+
"valid-jsdoc": "error",
288+
"vars-on-top": "off",
289+
"wrap-regex": "error",
290+
"yield-star-spacing": "error",
291+
"yoda": [
292+
"error",
293+
"never"
294+
]
295+
}
296+
};

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/js/impress.min.js.map
12
/js/impress.min.js
23
/node_modules
34
/npm-debug.log

README.md

+11
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,17 @@ REPOSITORY STRUCTURE
7979
WANT TO CONTRIBUTE?
8080
---------------------
8181

82+
### Requirements
83+
84+
* >= node 7.6
85+
* npm
86+
87+
### Setup
88+
89+
```bash
90+
npm install
91+
```
92+
8293
For developers, once you've made changes to the code, you should run these commands for testing:
8394

8495
npm run build

0 commit comments

Comments
 (0)