-
Notifications
You must be signed in to change notification settings - Fork 21
/
index.js
69 lines (63 loc) · 2.87 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
/**
* @fileoverview Entry point for eslint-plugin-qunit. Exports rules and configs.
* @author Kevin Partington
*/
/* eslint sort-keys: "error" */
"use strict";
const requireIndex = require("requireindex");
const pkg = require("./package.json");
module.exports = {
meta: {
name: pkg.name,
version: pkg.version
},
rules: requireIndex(`${__dirname}/lib/rules`),
// eslint-disable-next-line sort-keys
configs: {
recommended: {
description: [
"This configuration includes rules which I recommend to avoid QUnit runtime errors or incorrect behavior, some of which can be difficult to debug. Some of these rules also encourage best practices that help QUnit work better for you.",
"For ESLint `.eslintrc.js` legacy config, extend from `\"plugin:qunit/recommended\"`.",
"For ESLint `eslint.config.js` flat config, load from `require('eslint-plugin-qunit/configs/recommended')`."
].join(" "),
plugins: ["qunit"],
rules: {
"qunit/assert-args": "error",
"qunit/literal-compare-order": "error",
"qunit/no-assert-equal": "error",
"qunit/no-assert-equal-boolean": "error",
"qunit/no-assert-logical-expression": "error",
"qunit/no-async-in-loops": "error",
"qunit/no-async-module-callbacks": "error",
"qunit/no-async-test": "error",
"qunit/no-commented-tests": "error",
"qunit/no-compare-relation-boolean": "error",
"qunit/no-conditional-assertions": "error",
"qunit/no-early-return": "error",
"qunit/no-global-assertions": "error",
"qunit/no-global-expect": "error",
"qunit/no-global-module-test": "error",
"qunit/no-global-stop-start": "error",
"qunit/no-hooks-from-ancestor-modules": "error",
"qunit/no-identical-names": "error",
"qunit/no-init": "error",
"qunit/no-jsdump": "error",
"qunit/no-negated-ok": "error",
"qunit/no-nested-tests": "error",
"qunit/no-ok-equality": "error",
"qunit/no-only": "error",
"qunit/no-qunit-push": "error",
"qunit/no-qunit-start-in-tests": "error",
"qunit/no-qunit-stop": "error",
"qunit/no-reassign-log-callbacks": "error",
"qunit/no-reset": "error",
"qunit/no-setup-teardown": "error",
"qunit/no-test-expect-argument": "error",
"qunit/no-throws-string": "error",
"qunit/require-expect": "error",
"qunit/require-object-in-propequal": "error",
"qunit/resolve-async": "error"
}
}
}
};