Skip to content

Commit ed7dafa

Browse files
authored
Merge pull request #477 from stasm/cleanup1
Build tools cleanups, part 1
2 parents 560b21f + 9c89d2f commit ed7dafa

File tree

9 files changed

+15
-32
lines changed

9 files changed

+15
-32
lines changed

common.mk

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,6 @@ all: lint test build
1717
# Used for pre-publishing.
1818
dist: clean lint test build html
1919

20-
_lint:
21-
@eslint --config $(ROOT)/eslint_src.json --max-warnings 0 src/
22-
@eslint --config $(ROOT)/eslint_test.json --max-warnings 0 test/
23-
@echo -e " $(OK) lint"
24-
25-
_html:
26-
ifneq (,$(wildcard ./.esdoc.json))
27-
@esdoc
28-
@echo -e " $(OK) html built"
29-
endif
30-
31-
_clean:
32-
@rm -f index.js compat.js
33-
@rm -rf .nyc_output coverage
34-
@echo -e " $(OK) clean"
35-
3620
deps:
3721
@npm install
3822
@echo -e " $(OK) deps installed"

eslint_src.json renamed to eslint_js.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
{
2-
"parser": "babel-eslint",
32
"parserOptions": {
43
"ecmaVersion": 9,
54
"sourceType": "module"

eslint_test.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
{
2-
"parser": "babel-eslint",
32
"parserOptions": {
43
"ecmaVersion": 9,
54
"sourceType": "module",

eslint_ts.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"plugin:@typescript-eslint/eslint-recommended",
1414
"plugin:@typescript-eslint/recommended",
1515
"plugin:@typescript-eslint/recommended-requiring-type-checking",
16-
"./eslint_src.json"
16+
"./eslint_js.json"
1717
],
1818
"rules": {
1919
"complexity": "off",

fluent-dom/makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ DEPS := cached-iterable:CachedIterable
55
include ../common.mk
66

77
lint:
8-
@eslint --config $(ROOT)/eslint_src.json --max-warnings 0 src/
8+
@eslint --config $(ROOT)/eslint_js.json --max-warnings 0 src/
99
@eslint --config $(ROOT)/eslint_test.json --max-warnings 0 test/
1010
@echo -e " $(OK) lint"
1111

fluent-gecko/makefile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ include ../common.mk
66
version = $(1)@$(shell node -e "\
77
console.log(require('../$(1)/package.json').version)")
88

9+
lint:
10+
@eslint --config $(ROOT)/eslint_js.json --max-warnings 0 src/
11+
@eslint --config $(ROOT)/eslint_test.json --max-warnings 0 test/
12+
@echo -e " $(OK) lint"
13+
914
test:
1015
@nyc --reporter=text --reporter=html mocha \
1116
--recursive --ui tdd \
@@ -66,5 +71,4 @@ clean:
6671
@rm -rf .nyc_output coverage
6772
@echo -e " $(OK) clean"
6873

69-
lint: _lint
70-
html: _html
74+
html: ;

fluent-langneg/src/subtags.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ const regionMatchingLangs = [
5252
];
5353

5454
export function getLikelySubtagsMin(loc: string): Locale | null {
55-
if (likelySubtagsMin.hasOwnProperty(loc)) {
55+
if (Object.prototype.hasOwnProperty.call(likelySubtagsMin, loc)) {
5656
return new Locale(likelySubtagsMin[loc]);
5757
}
5858
const locale = new Locale(loc);

fluent-react/src/localized.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,10 @@ export function Localized(props: LocalizedProps): ReactElement {
155155
const childName = childNode.nodeName.toLowerCase();
156156

157157
// If the child is not expected just take its textContent.
158-
if (!elemsLower || !elemsLower.hasOwnProperty(childName)) {
158+
if (
159+
!elemsLower ||
160+
!Object.prototype.hasOwnProperty.call(elemsLower, childName)
161+
) {
159162
return childNode.textContent;
160163
}
161164

package.json

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,14 @@
1010
"@babel/preset-env": "^7.4.3",
1111
"@typescript-eslint/eslint-plugin": "^2.10.0",
1212
"@typescript-eslint/parser": "^2.10.0",
13-
"babel-eslint": "^10.0.1",
1413
"colors": "^1.3.3",
1514
"commander": "^2.20",
16-
"esdoc": "^1.1.0",
17-
"esdoc-ecmascript-proposal-plugin": "^1.0.0",
18-
"esdoc-jsx-plugin": "^1.0.0",
19-
"esdoc-standard-plugin": "^1.0.0",
20-
"eslint": "^5.16.0",
21-
"eslint-plugin-mocha": "^5.3.0",
15+
"eslint": "6.8.x",
16+
"eslint-plugin-mocha": "6.3.x",
2217
"esm": "^3.2.22",
2318
"fuzzer": "^0.2.1",
2419
"gh-pages": "^2.0.1",
2520
"intl-pluralrules": "^1.0.0",
26-
"jsdoc": "^3.5.5",
2721
"mocha": "^6.1.2",
2822
"nyc": "^13.3.0",
2923
"prettyjson": "^1.2.1",

0 commit comments

Comments
 (0)