Skip to content

Commit 181295f

Browse files
authored
fix: prettier config (#2719)
1 parent 244277d commit 181295f

File tree

458 files changed

+6950
-5238
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

458 files changed

+6950
-5238
lines changed

.codecov.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ codecov:
44
coverage:
55
precision: 2
66
round: down
7-
range: '50...100'
7+
range: "50...100"
88

99
parsers:
1010
gcov:
@@ -15,6 +15,6 @@ parsers:
1515
macro: no
1616

1717
comment:
18-
layout: 'reach,diff,flags,files,footer'
18+
layout: "reach,diff,flags,files,footer"
1919
behavior: default
2020
require_changes: no

.eslintrc.js

+25-17
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
module.exports = {
22
root: true,
33
reportUnusedDisableDirectives: true,
4-
extends: ['eslint:recommended', 'plugin:node/recommended', 'plugin:prettier/recommended', 'prettier'],
5-
parserOptions: { ecmaVersion: 2018, sourceType: 'script' },
6-
plugins: ['node'],
4+
extends: [
5+
"eslint:recommended",
6+
"plugin:node/recommended",
7+
"plugin:prettier/recommended",
8+
"prettier",
9+
],
10+
parserOptions: { ecmaVersion: 2018, sourceType: "script" },
11+
plugins: ["node"],
712
settings: {
813
node: {
9-
allowModules: ['@webpack-cli/generators'],
14+
allowModules: ["@webpack-cli/generators"],
1015
},
1116
},
1217
env: {
@@ -15,27 +20,30 @@ module.exports = {
1520
jest: true,
1621
},
1722
rules: {
18-
quotes: ['error', 'single', { avoidEscape: true, allowTemplateLiterals: false }],
19-
'no-process-exit': 'off',
20-
'no-template-curly-in-string': 'error',
21-
'no-caller': 'error',
22-
'no-extra-bind': 'error',
23-
'no-loop-func': 'error',
24-
'no-undef': 'error',
23+
"no-process-exit": "off",
24+
"no-template-curly-in-string": "error",
25+
"no-caller": "error",
26+
"no-extra-bind": "error",
27+
"no-loop-func": "error",
28+
"no-undef": "error",
2529
},
2630
overrides: [
2731
{
2832
settings: {
2933
node: {
30-
tryExtensions: ['.ts', '.tsx', '.js', '.jsx', '.json'],
34+
tryExtensions: [".ts", ".tsx", ".js", ".jsx", ".json"],
3135
},
3236
},
33-
files: ['**/*.ts'],
34-
extends: ['plugin:@typescript-eslint/eslint-recommended', 'plugin:@typescript-eslint/recommended', 'prettier'],
35-
parser: '@typescript-eslint/parser',
36-
plugins: ['@typescript-eslint'],
37+
files: ["**/*.ts"],
38+
extends: [
39+
"plugin:@typescript-eslint/eslint-recommended",
40+
"plugin:@typescript-eslint/recommended",
41+
"prettier",
42+
],
43+
parser: "@typescript-eslint/parser",
44+
plugins: ["@typescript-eslint"],
3745
rules: {
38-
'node/no-unsupported-features/es-syntax': 'off',
46+
"node/no-unsupported-features/es-syntax": "off",
3947
},
4048
},
4149
],

.github/ISSUE_TEMPLATE/Bug_report.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
name: "[BUG]: \U0001F41EReport"
33
about: "Template for \U0001F98E's you encounter with webpack-cli"
4-
labels: 'Bug'
4+
labels: "Bug"
55
---
66

77
**Describe the bug**

.github/ISSUE_TEMPLATE/Feature_request.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
name: "[FEATURE]: Feature request \U0001F914"
33
about: "Suggest ideas you wish webpack-cli had \U0001F680"
4-
labels: 'Feature Request'
4+
labels: "Feature Request"
55
---
66

77
**Is your feature request related to a problem? Please describe.**

.github/dependabot.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
version: 2
22
updates:
33
- package-ecosystem: npm
4-
directory: '/'
4+
directory: "/"
55
schedule:
66
interval: daily
7-
time: '04:00'
7+
time: "04:00"
88
timezone: Europe/Berlin
99
open-pull-requests-limit: 10
1010
versioning-strategy: lockfile-only

.github/workflows/nodejs.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212
workflow_dispatch:
1313
inputs:
1414
tags:
15-
description: 'Test description'
15+
description: "Test description"
1616

1717
jobs:
1818
lint:
@@ -115,7 +115,7 @@ jobs:
115115

116116
- uses: actions/setup-node@v1
117117
with:
118-
node-version: '12.x'
118+
node-version: "12.x"
119119

120120
- run: npm install
121121

commitlint.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module.exports = {
2-
extends: ['@commitlint/config-conventional'],
2+
extends: ["@commitlint/config-conventional"],
33
};

jest.config.js

+20-15
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,30 @@
1-
const { cli } = require('webpack');
1+
const { cli } = require("webpack");
22

33
// Ignore core-flags test for webpack@4
44
const ignorePattern =
5-
typeof cli !== 'undefined' ? ['<rootDir>/node_modules/'] : ['<rootDir>/node_modules/', '<rootDir>/test/build/core-flags'];
5+
typeof cli !== "undefined"
6+
? ["<rootDir>/node_modules/"]
7+
: ["<rootDir>/node_modules/", "<rootDir>/test/build/core-flags"];
68

79
module.exports = {
810
testPathIgnorePatterns: ignorePattern,
9-
testEnvironment: 'node',
11+
testEnvironment: "node",
1012
collectCoverage: true,
11-
coverageDirectory: '.nyc_output',
12-
coverageReporters: ['json'],
13-
coveragePathIgnorePatterns: ['<rootDir>/test/'],
13+
coverageDirectory: ".nyc_output",
14+
coverageReporters: ["json"],
15+
coveragePathIgnorePatterns: ["<rootDir>/test/"],
1416
transform: {
15-
'^.+\\.(ts)?$': 'ts-jest',
17+
"^.+\\.(ts)?$": "ts-jest",
1618
},
17-
testRegex: ['/test/.*\\.(test.js|test.ts)$'],
18-
moduleFileExtensions: ['ts', 'js', 'json'],
19-
snapshotResolver: '<rootDir>/scripts/snapshotResolver.js',
20-
watchPlugins: ['jest-watch-typeahead/filename', 'jest-watch-typeahead/testname'],
21-
setupFilesAfterEnv: ['<rootDir>/setupTest.js'],
22-
globalTeardown: '<rootDir>/scripts/cleanupTest.js',
23-
globalSetup: '<rootDir>/scripts/globalSetup.js',
24-
modulePathIgnorePatterns: ['<rootDir>/test/loader/test-loader', '<rootDir>/test/plugin/test-plugin'],
19+
testRegex: ["/test/.*\\.(test.js|test.ts)$"],
20+
moduleFileExtensions: ["ts", "js", "json"],
21+
snapshotResolver: "<rootDir>/scripts/snapshotResolver.js",
22+
watchPlugins: ["jest-watch-typeahead/filename", "jest-watch-typeahead/testname"],
23+
setupFilesAfterEnv: ["<rootDir>/setupTest.js"],
24+
globalTeardown: "<rootDir>/scripts/cleanupTest.js",
25+
globalSetup: "<rootDir>/scripts/globalSetup.js",
26+
modulePathIgnorePatterns: [
27+
"<rootDir>/test/loader/test-loader",
28+
"<rootDir>/test/plugin/test-plugin",
29+
],
2530
};

lint-staged.config.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
module.exports = {
2-
'*.{json,md,yml,css}': ['prettier --write'],
3-
'*.{js,ts}': ['eslint --fix', 'prettier --write'],
2+
"*.{json,md,yml,css}": ["prettier --write"],
3+
"*.{js,ts}": ["eslint --fix", "prettier --write"],
44
};

0 commit comments

Comments
 (0)