Skip to content

Commit 993d98f

Browse files
committed
Level up package
API: add `buffer` method to Source remove node and listNode methods from public API remove LineToLineMappedSource add SizeOnlySource Bugfixes: ConcatSource falls back to sourceAndMap when node() or listMap() is not available PrefixSource do no longer insert prefix in the middle of the line in some cases Contributing: add prettier remove js-beautify update eslint config format all files check formating in CI var to let/const Code Style: remove mixin in favor of helper methods Performance: avoid unnecessary sorting in ReplaceSource make exports lazy Tests: add more tests Other: add Source types to hash update deps
1 parent 7f952e3 commit 993d98f

29 files changed

+1823
-1659
lines changed

.editorconfig

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
root = true
22

3-
[*.js]
4-
indent_style=tab
5-
trim_trailing_whitespace=true
3+
[*]
4+
indent_style = tab
5+
indent_size = 2
6+
charset = utf-8
7+
trim_trailing_whitespace = true
8+
insert_final_newline = true
9+
max_line_length = 80
10+
11+
[*.{yml,yaml,json}]
12+
indent_style = space
13+
indent_size = 2

.eslintrc

Lines changed: 0 additions & 29 deletions
This file was deleted.

.eslintrc.js

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
module.exports = {
2+
root: true,
3+
plugins: ["prettier", "node", "mocha"],
4+
extends: [
5+
"eslint:recommended",
6+
"plugin:node/recommended",
7+
"plugin:prettier/recommended"
8+
],
9+
env: {
10+
node: true,
11+
es6: true,
12+
mocha: true
13+
},
14+
parserOptions: {
15+
ecmaVersion: 2017
16+
},
17+
rules: {
18+
"prettier/prettier": "error",
19+
"no-undef": "error",
20+
"no-extra-semi": "error",
21+
"no-template-curly-in-string": "error",
22+
"no-caller": "error",
23+
"no-control-regex": "off",
24+
yoda: "error",
25+
eqeqeq: "error",
26+
"global-require": "off",
27+
"brace-style": "off",
28+
"eol-last": "error",
29+
"no-extra-bind": "warn",
30+
"no-process-exit": "warn",
31+
"no-use-before-define": "off",
32+
"no-unused-vars": ["error", { args: "none" }],
33+
"no-unsafe-negation": "error",
34+
"no-loop-func": "warn",
35+
indent: "off",
36+
"no-console": "off",
37+
"valid-jsdoc": [
38+
"error",
39+
{
40+
prefer: {
41+
return: "returns",
42+
prop: "property",
43+
memberof: "DONTUSE",
44+
class: "DONTUSE",
45+
inheritdoc: "DONTUSE",
46+
description: "DONTUSE",
47+
readonly: "DONTUSE"
48+
},
49+
preferType: {
50+
"*": "any"
51+
},
52+
requireReturnType: true
53+
}
54+
],
55+
"node/no-unsupported-features": "error",
56+
"node/no-deprecated-api": "error",
57+
"node/no-missing-import": "error",
58+
"node/no-missing-require": "error",
59+
"node/no-unpublished-bin": "error",
60+
"node/no-unpublished-require": "error",
61+
"node/process-exit-as-throw": "error"
62+
}
63+
};

.jsbeautifyrc

Lines changed: 0 additions & 25 deletions
This file was deleted.

.prettierrc.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
module.exports = {
2+
printWidth: 80,
3+
useTabs: true,
4+
tabWidth: 2,
5+
overrides: [
6+
{
7+
files: "*.json",
8+
options: {
9+
useTabs: false
10+
}
11+
}
12+
]
13+
};

.travis.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,21 @@ branches:
77

88
matrix:
99
include:
10+
- os: linux
11+
node_js: "10"
1012
- os: linux
1113
node_js: "8"
1214
- os: linux
1315
node_js: "6"
14-
- os: linux
15-
node_js: "4.3"
1616
- os: osx
17-
node_js: "8"
17+
node_js: "10"
1818
allow_failures:
1919
- os: osx
2020
fast_finish: true
2121

22-
script: npm run travis
22+
script: yarn travis
2323

2424
after_success:
2525
- cat ./coverage/lcov.info | node_modules/.bin/coveralls --verbose
26-
- cat ./coverage/coverage.json | node_modules/codecov.io/bin/codecov.io.js
26+
- bash <(curl -s https://codecov.io/bash) -X gcov
2727
- rm -rf ./coverage

0 commit comments

Comments
 (0)