From 5a6d64bbd2e7778c4fbb3df443442edd6cecafa2 Mon Sep 17 00:00:00 2001 From: Macklin Underdown Date: Thu, 8 Feb 2018 11:45:07 -0500 Subject: [PATCH] refactor: rename files to use kebab-case --- index.js | 20 +++++++++---------- ...s.snap => no-large-snapshots.test.js.snap} | 0 ...tests.test.js => no-focused-tests.test.js} | 0 ...tle.test.js => no-identical-title.test.js} | 0 ...ots.test.js => no-large-snapshots.test.js} | 2 +- ...tests.test.js => no-skipped-tests.test.js} | 0 ...st.js => prefer-expect-assertions.test.js} | 0 ...null.test.js => prefer-to-be-null.test.js} | 0 ...test.js => prefer-to-be-undefined.test.js} | 0 ....test.js => prefer-to-have-length.test.js} | 0 ...est.js => valid-expect-in-promise.test.js} | 0 ...id_expect.test.js => valid-expect.test.js} | 0 ...disabled_tests.js => no-disabled-tests.js} | 0 ...o_focused_tests.js => no-focused-tests.js} | 0 ...entical_title.js => no-identical-title.js} | 0 ...rge_snapshots.js => no-large-snapshots.js} | 0 ...ertions.js => prefer-expect-assertions.js} | 0 ...fer_to_be_null.js => prefer-to-be-null.js} | 0 ...undefined.js => prefer-to-be-undefined.js} | 0 ...ave_length.js => prefer-to-have-length.js} | 0 ..._promise.js => valid-expect-in-promise.js} | 0 rules/{valid_expect.js => valid-expect.js} | 0 22 files changed, 11 insertions(+), 11 deletions(-) rename rules/__tests__/__snapshots__/{no_large_snapshots.test.js.snap => no-large-snapshots.test.js.snap} (100%) rename rules/__tests__/{no_focused_tests.test.js => no-focused-tests.test.js} (100%) rename rules/__tests__/{no_identical_title.test.js => no-identical-title.test.js} (100%) rename rules/__tests__/{no_large_snapshots.test.js => no-large-snapshots.test.js} (97%) rename rules/__tests__/{no_skipped_tests.test.js => no-skipped-tests.test.js} (100%) rename rules/__tests__/{prefer_expect_assertions.test.js => prefer-expect-assertions.test.js} (100%) rename rules/__tests__/{prefer_to_be_null.test.js => prefer-to-be-null.test.js} (100%) rename rules/__tests__/{prefer_to_be_undefined.test.js => prefer-to-be-undefined.test.js} (100%) rename rules/__tests__/{prefer_to_have_length.test.js => prefer-to-have-length.test.js} (100%) rename rules/__tests__/{valid_expect_in_promise.test.js => valid-expect-in-promise.test.js} (100%) rename rules/__tests__/{valid_expect.test.js => valid-expect.test.js} (100%) rename rules/{no_disabled_tests.js => no-disabled-tests.js} (100%) rename rules/{no_focused_tests.js => no-focused-tests.js} (100%) rename rules/{no_identical_title.js => no-identical-title.js} (100%) rename rules/{no_large_snapshots.js => no-large-snapshots.js} (100%) rename rules/{prefer_expect_assertions.js => prefer-expect-assertions.js} (100%) rename rules/{prefer_to_be_null.js => prefer-to-be-null.js} (100%) rename rules/{prefer_to_be_undefined.js => prefer-to-be-undefined.js} (100%) rename rules/{prefer_to_have_length.js => prefer-to-have-length.js} (100%) rename rules/{valid_expect_in_promise.js => valid-expect-in-promise.js} (100%) rename rules/{valid_expect.js => valid-expect.js} (100%) diff --git a/index.js b/index.js index d3eac65e4..85853c5f7 100644 --- a/index.js +++ b/index.js @@ -1,15 +1,15 @@ 'use strict'; -const noDisabledTests = require('./rules/no_disabled_tests'); -const noFocusedTests = require('./rules/no_focused_tests'); -const noIdenticalTitle = require('./rules/no_identical_title'); -const noLargeSnapshots = require('./rules/no_large_snapshots'); -const preferToBeNull = require('./rules/prefer_to_be_null'); -const preferToBeUndefined = require('./rules/prefer_to_be_undefined'); -const preferToHaveLength = require('./rules/prefer_to_have_length'); -const validExpect = require('./rules/valid_expect'); -const preferExpectAssertions = require('./rules/prefer_expect_assertions'); -const validExpectInPromise = require('./rules/valid_expect_in_promise'); +const noDisabledTests = require('./rules/no-disabled-tests'); +const noFocusedTests = require('./rules/no-focused-tests'); +const noIdenticalTitle = require('./rules/no-identical-title'); +const noLargeSnapshots = require('./rules/no-large-snapshots'); +const preferToBeNull = require('./rules/prefer-to-be-null'); +const preferToBeUndefined = require('./rules/prefer-to-be-undefined'); +const preferToHaveLength = require('./rules/prefer-to-have-length'); +const validExpect = require('./rules/valid-expect'); +const preferExpectAssertions = require('./rules/prefer-expect-assertions'); +const validExpectInPromise = require('./rules/valid-expect-in-promise'); const snapshotProcessor = require('./processors/snapshot-processor'); diff --git a/rules/__tests__/__snapshots__/no_large_snapshots.test.js.snap b/rules/__tests__/__snapshots__/no-large-snapshots.test.js.snap similarity index 100% rename from rules/__tests__/__snapshots__/no_large_snapshots.test.js.snap rename to rules/__tests__/__snapshots__/no-large-snapshots.test.js.snap diff --git a/rules/__tests__/no_focused_tests.test.js b/rules/__tests__/no-focused-tests.test.js similarity index 100% rename from rules/__tests__/no_focused_tests.test.js rename to rules/__tests__/no-focused-tests.test.js diff --git a/rules/__tests__/no_identical_title.test.js b/rules/__tests__/no-identical-title.test.js similarity index 100% rename from rules/__tests__/no_identical_title.test.js rename to rules/__tests__/no-identical-title.test.js diff --git a/rules/__tests__/no_large_snapshots.test.js b/rules/__tests__/no-large-snapshots.test.js similarity index 97% rename from rules/__tests__/no_large_snapshots.test.js rename to rules/__tests__/no-large-snapshots.test.js index d1b67656b..8c2942a34 100644 --- a/rules/__tests__/no_large_snapshots.test.js +++ b/rules/__tests__/no-large-snapshots.test.js @@ -1,6 +1,6 @@ 'use strict'; -const noLargeSnapshots = require('../no_large_snapshots').create; +const noLargeSnapshots = require('../no-large-snapshots').create; // was not able to use https://eslint.org/docs/developer-guide/nodejs-api#ruletester for these because there is no way to configure RuleTester to run non .js files describe('no-large-snapshots', () => { diff --git a/rules/__tests__/no_skipped_tests.test.js b/rules/__tests__/no-skipped-tests.test.js similarity index 100% rename from rules/__tests__/no_skipped_tests.test.js rename to rules/__tests__/no-skipped-tests.test.js diff --git a/rules/__tests__/prefer_expect_assertions.test.js b/rules/__tests__/prefer-expect-assertions.test.js similarity index 100% rename from rules/__tests__/prefer_expect_assertions.test.js rename to rules/__tests__/prefer-expect-assertions.test.js diff --git a/rules/__tests__/prefer_to_be_null.test.js b/rules/__tests__/prefer-to-be-null.test.js similarity index 100% rename from rules/__tests__/prefer_to_be_null.test.js rename to rules/__tests__/prefer-to-be-null.test.js diff --git a/rules/__tests__/prefer_to_be_undefined.test.js b/rules/__tests__/prefer-to-be-undefined.test.js similarity index 100% rename from rules/__tests__/prefer_to_be_undefined.test.js rename to rules/__tests__/prefer-to-be-undefined.test.js diff --git a/rules/__tests__/prefer_to_have_length.test.js b/rules/__tests__/prefer-to-have-length.test.js similarity index 100% rename from rules/__tests__/prefer_to_have_length.test.js rename to rules/__tests__/prefer-to-have-length.test.js diff --git a/rules/__tests__/valid_expect_in_promise.test.js b/rules/__tests__/valid-expect-in-promise.test.js similarity index 100% rename from rules/__tests__/valid_expect_in_promise.test.js rename to rules/__tests__/valid-expect-in-promise.test.js diff --git a/rules/__tests__/valid_expect.test.js b/rules/__tests__/valid-expect.test.js similarity index 100% rename from rules/__tests__/valid_expect.test.js rename to rules/__tests__/valid-expect.test.js diff --git a/rules/no_disabled_tests.js b/rules/no-disabled-tests.js similarity index 100% rename from rules/no_disabled_tests.js rename to rules/no-disabled-tests.js diff --git a/rules/no_focused_tests.js b/rules/no-focused-tests.js similarity index 100% rename from rules/no_focused_tests.js rename to rules/no-focused-tests.js diff --git a/rules/no_identical_title.js b/rules/no-identical-title.js similarity index 100% rename from rules/no_identical_title.js rename to rules/no-identical-title.js diff --git a/rules/no_large_snapshots.js b/rules/no-large-snapshots.js similarity index 100% rename from rules/no_large_snapshots.js rename to rules/no-large-snapshots.js diff --git a/rules/prefer_expect_assertions.js b/rules/prefer-expect-assertions.js similarity index 100% rename from rules/prefer_expect_assertions.js rename to rules/prefer-expect-assertions.js diff --git a/rules/prefer_to_be_null.js b/rules/prefer-to-be-null.js similarity index 100% rename from rules/prefer_to_be_null.js rename to rules/prefer-to-be-null.js diff --git a/rules/prefer_to_be_undefined.js b/rules/prefer-to-be-undefined.js similarity index 100% rename from rules/prefer_to_be_undefined.js rename to rules/prefer-to-be-undefined.js diff --git a/rules/prefer_to_have_length.js b/rules/prefer-to-have-length.js similarity index 100% rename from rules/prefer_to_have_length.js rename to rules/prefer-to-have-length.js diff --git a/rules/valid_expect_in_promise.js b/rules/valid-expect-in-promise.js similarity index 100% rename from rules/valid_expect_in_promise.js rename to rules/valid-expect-in-promise.js diff --git a/rules/valid_expect.js b/rules/valid-expect.js similarity index 100% rename from rules/valid_expect.js rename to rules/valid-expect.js