Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
module.exports = {
env: {
commonjs: true,
es2021: true,
},
plugins: ["prettier", "jest"],
extends: ["airbnb-base", "plugin:prettier/recommended"],
parserOptions: {
ecmaVersion: 12,
},
rules: {
// prettier integration
"prettier/prettier": "error",

// project rules overrides
"no-console": "off",
},
ignorePatterns: ["test/mock-project/dist"],
overrides: [
{
files: ["*.test.js"],
env: {
"jest/globals": true,
},
rules: {
"no-use-before-define": "off",
},
},
],
};
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ You're free to contribute to this project by submitting issues and/or pull reque
* `npm test` - run test suite
* `npm run test:coverage` - run test suite and generate coverage reports
* `npm run test:build` - build the test mock project with webpack-cli
* `npm run lint` - lint the code base with eslint
* `npm run lint:fix` - try to fix as many linting issues as possible (the command will also format the code)
* `npm run format` - format code following project conventions
* `npm run coveralls` - send coverage report to https://coveralls.io

Expand Down
2 changes: 0 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
"use strict";

const RemoveSourceMapURLWebpackPlugin = require("./src/plugin");

module.exports = RemoveSourceMapURLWebpackPlugin;
40 changes: 27 additions & 13 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ module.exports = {
// Indicates whether the coverage information should be collected while executing the test
// collectCoverage: false,

// An array of glob patterns indicating a set of files for which coverage information should be collected
// An array of glob patterns indicating a set of files
// for which coverage information should be collected
// collectCoverageFrom: undefined,

// The directory where Jest should output its coverage files
Expand Down Expand Up @@ -53,7 +54,8 @@ module.exports = {
// Force coverage collection from ignored files using an array of glob patterns
// forceCoverageMatch: [],

// A path to a module which exports an async function that is triggered once before all test suites
// A path to a module which exports an async function
// that is triggered once before all test suites
// globalSetup: undefined,

// A path to a module which exports an async function that is triggered once after all test suites
Expand All @@ -62,7 +64,9 @@ module.exports = {
// A set of global variables that need to be available in all test environments
// globals: {},

// The maximum amount of workers used to run your tests. Can be specified as % or a number. E.g. maxWorkers: 10% will use 10% of your CPU amount + 1 as the maximum worker number. maxWorkers: 2 will use a maximum of 2 workers.
// The maximum amount of workers used to run your tests. Can be specified as % or a number.
// E.g. maxWorkers: 10% will use 10% of your CPU amount + 1 as the maximum worker number.
// maxWorkers: 2 will use a maximum of 2 workers.
// maxWorkers: "50%",

// An array of directory names to be searched recursively up from the requiring module's location
Expand All @@ -80,10 +84,12 @@ module.exports = {
// "node"
// ],

// A map from regular expressions to module names or to arrays of module names that allow to stub out resources with a single module
// A map from regular expressions to module names
// or to arrays of module names that allow to stub out resources with a single module
// moduleNameMapper: {},

// An array of regexp pattern strings, matched against all module paths before considered 'visible' to the module loader
// An array of regexp pattern strings, matched against all module paths
// before considered 'visible' to the module loader
// modulePathIgnorePatterns: [],

// Activates notifications for test results
Expand Down Expand Up @@ -124,13 +130,16 @@ module.exports = {
// Allows you to use a custom runner instead of Jest's default test runner
// runner: "jest-runner",

// The paths to modules that run some code to configure or set up the testing environment before each test
// The paths to modules that run some code to configure
// or set up the testing environment before each test
// setupFiles: [],

// A list of paths to modules that run some code to configure or set up the testing framework before each test
// A list of paths to modules that run some code to configure
// or set up the testing framework before each test
// setupFilesAfterEnv: [],

// The number of seconds after which a test is considered as slow and reported as such in the results.
// The number of seconds after which a test is considered
// as slow and reported as such in the results.
// slowTestThreshold: 5,

// A list of paths to snapshot serializer modules Jest should use for snapshot testing
Expand All @@ -151,7 +160,8 @@ module.exports = {
// "**/?(*.)+(spec|test).[tj]s?(x)"
// ],

// An array of regexp pattern strings that are matched against all test paths, matched tests are skipped
// An array of regexp pattern strings that are matched against all test paths,
// matched tests are skipped
// testPathIgnorePatterns: [
// "/node_modules/"
// ],
Expand All @@ -165,7 +175,8 @@ module.exports = {
// This option allows use of a custom test runner
// testRunner: "jasmine2",

// This option sets the URL for the jsdom environment. It is reflected in properties such as location.href
// This option sets the URL for the jsdom environment.
// It is reflected in properties such as location.href
// testURL: "http://localhost",

// Setting this value to "fake" allows the use of fake timers for functions such as "setTimeout"
Expand All @@ -174,19 +185,22 @@ module.exports = {
// A map from regular expressions to paths to transformers
// transform: undefined,

// An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation
// An array of regexp pattern strings that are matched against all source file paths,
// matched files will skip transformation
// transformIgnorePatterns: [
// "/node_modules/",
// "\\.pnp\\.[^\\/]+$"
// ],

// An array of regexp pattern strings that are matched against all modules before the module loader will automatically return a mock for them
// An array of regexp pattern strings that are matched against all modules
// before the module loader will automatically return a mock for them
// unmockedModulePathPatterns: undefined,

// Indicates whether each individual test should be reported during the run
// verbose: undefined,

// An array of regexp patterns that are matched against all source file paths before re-running tests in watch mode
// An array of regexp patterns that are matched against
// all source file paths before re-running tests in watch mode
// watchPathIgnorePatterns: [],

// Whether to use watchman for file crawling
Expand Down
Loading