eslint-plugin-ember-template-lint 0.17.0 → 0.19.0
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +2 -2
- package/lib/config/index.js +1 -1
- package/lib/{ember-teplate-lint → ember-template-lint}/info.js +7 -4
- package/lib/index.js +1 -1
- package/lib/rules/lint.js +1 -1
- package/package.json +1 -1
- /package/lib/{ember-teplate-lint → ember-template-lint}/config.js +0 -0
- /package/lib/{ember-teplate-lint → ember-template-lint}/worker.js +0 -0
package/README.md
CHANGED
@@ -42,7 +42,7 @@ to just use the `.template-lintrc.js` config file just use
|
|
42
42
|
|
43
43
|
to load ember-template-lint plugins in eslinrc you need to manually register them:
|
44
44
|
```js
|
45
|
-
require('eslint-plugin-ember-template-lint/lib/ember-
|
45
|
+
require('eslint-plugin-ember-template-lint/lib/ember-template-lint/config').registerPlugin('ember-template-lint-plugin-prettier');
|
46
46
|
```
|
47
47
|
|
48
48
|
## IMPORTANT
|
@@ -53,7 +53,7 @@ for typescript parser you can extend its base config, then it will work correctl
|
|
53
53
|
```js
|
54
54
|
// .eslintrc.js
|
55
55
|
// optional:
|
56
|
-
require('eslint-plugin-ember-template-lint/lib/ember-
|
56
|
+
require('eslint-plugin-ember-template-lint/lib/ember-template-lint/config').registerPlugin('ember-template-lint-plugin-prettier');
|
57
57
|
|
58
58
|
|
59
59
|
module.exports = {
|
package/lib/config/index.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
const synckit = require('synckit');
|
2
2
|
const syncFn = synckit.createSyncFn(require.resolve('./worker'));
|
3
3
|
const { runTemplateLint } = require('../rules/lint');
|
4
|
-
const { registerRule, templateLintConfig } = require('../ember-
|
4
|
+
const { registerRule, templateLintConfig } = require('../ember-template-lint/config');
|
5
5
|
|
6
6
|
const lintWithEslintConfigs = syncFn({ config: templateLintConfig });
|
7
7
|
const lintConfigs = syncFn();
|
@@ -93,9 +93,12 @@ Object.values(configs).forEach((config) => {
|
|
93
93
|
|
94
94
|
const configuredRules = {};
|
95
95
|
Object.entries(lintConfigs.configuredRules).forEach(([name, conf]) => {
|
96
|
-
|
97
|
-
|
98
|
-
configuredRules['ember-template-lint/' + name].push(conf.
|
96
|
+
if (conf.severity) {
|
97
|
+
configuredRules['ember-template-lint/' + name] = configuredRules['ember-template-lint/' + name] || [];
|
98
|
+
configuredRules['ember-template-lint/' + name].push(conf.severity);
|
99
|
+
if (typeof conf.config !== 'boolean') {
|
100
|
+
configuredRules['ember-template-lint/' + name].push(conf.config);
|
101
|
+
}
|
99
102
|
}
|
100
103
|
});
|
101
104
|
|
package/lib/index.js
CHANGED
@@ -10,7 +10,7 @@
|
|
10
10
|
|
11
11
|
const configs = require('./config');
|
12
12
|
const base = require('./config/base');
|
13
|
-
const templateRules = require('./ember-
|
13
|
+
const templateRules = require('./ember-template-lint/info');
|
14
14
|
const processor = require('./processor');
|
15
15
|
|
16
16
|
//------------------------------------------------------------------------------
|
package/lib/rules/lint.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
'use strict';
|
2
2
|
const synckit = require('synckit');
|
3
3
|
const DocumentLines = require('../utils/document');
|
4
|
-
const { templateLintConfig } = require('../ember-
|
4
|
+
const { templateLintConfig } = require('../ember-template-lint/config');
|
5
5
|
|
6
6
|
function runTemplateLint(node, context) {
|
7
7
|
const sourceCode = context.getSourceCode();
|
package/package.json
CHANGED
File without changes
|
File without changes
|