Skip to content
This repository was archived by the owner on Feb 21, 2020. It is now read-only.

Commit 949b4d6

Browse files
committed
fix wrong test for validating configuration againts schema of the rule
1 parent 2c093d6 commit 949b4d6

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

tests/filenames.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ describe('Rules Configurations', () => {
3030
if (rule.meta != null && rule.meta.schema != null && Array.isArray(rule.meta.schema) && rule.meta.schema.length > 0) {
3131
it(`rule "${ruleName}" has valid configuration`, async () => {
3232
const schemas = rule.meta.schema;
33-
const localRule = localConfig.rules[ruleName];
33+
const localRule = localConfig.rules[`filenames/${ruleName}`];
3434
if (Array.isArray(localRule) && localRule.length > 1) {
3535
const configurations = localRule.slice(1);
3636
for (let index = 0; index < configurations.length; index++) {

tests/flow.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ describe('Rules Configurations', () => {
3838
if (rule.meta != null && rule.meta.schema != null && Array.isArray(rule.meta.schema) && rule.meta.schema.length > 0) {
3939
it(`rule "${ruleName}" has valid configuration`, async () => {
4040
const schemas = rule.meta.schema;
41-
const localRule = localConfig.rules[ruleName];
41+
const localRule = localConfig.rules[`flowtype/${ruleName}`];
4242
if (Array.isArray(localRule) && localRule.length > 1) {
4343
const configurations = localRule.slice(1);
4444
for (let index = 0; index < configurations.length; index++) {

tests/import.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ describe('Rules Configurations', () => {
3030
if (rule.meta != null && rule.meta.schema != null && Array.isArray(rule.meta.schema) && rule.meta.schema.length > 0) {
3131
it(`rule "${ruleName}" has valid configuration`, async () => {
3232
const schemas = rule.meta.schema;
33-
const localRule = localConfig.rules[ruleName];
33+
const localRule = localConfig.rules[`import/${ruleName}`];
3434
if (Array.isArray(localRule) && localRule.length > 1) {
3535
const configurations = localRule.slice(1);
3636
for (let index = 0; index < configurations.length; index++) {

tests/sortImportsES6.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ describe('Rules Configurations', () => {
3030
if (rule.meta != null && rule.meta.schema != null && Array.isArray(rule.meta.schema) && rule.meta.schema.length > 0) {
3131
it(`rule "${ruleName}" has valid configuration`, async () => {
3232
const schemas = rule.meta.schema;
33-
const localRule = localConfig.rules[ruleName];
33+
const localRule = localConfig.rules[`sort-imports-es6-autofix/${ruleName}`];
3434
if (Array.isArray(localRule) && localRule.length > 1) {
3535
const configurations = localRule.slice(1);
3636
for (let index = 0; index < configurations.length; index++) {

tests/typescript.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ describe('Rules Configurations', () => {
4545
if (rule.meta != null && rule.meta.schema != null && Array.isArray(rule.meta.schema) && rule.meta.schema.length > 0) {
4646
it(`rule "${ruleName}" has valid configuration`, async () => {
4747
const schemas = rule.meta.schema;
48-
const localRule = localConfig.rules[ruleName];
48+
const localRule = localConfig.rules[`@typescript-eslint/${ruleName}`];
4949
if (Array.isArray(localRule) && localRule.length > 1) {
5050
const configurations = localRule.slice(1);
5151
for (let index = 0; index < configurations.length; index++) {

0 commit comments

Comments
 (0)