Skip to content

Commit

Permalink
fix: prettier config (#2719)
Browse files Browse the repository at this point in the history
  • Loading branch information
anshumanv committed May 15, 2021
1 parent 244277d commit 181295f
Show file tree
Hide file tree
Showing 458 changed files with 6,950 additions and 5,238 deletions.
4 changes: 2 additions & 2 deletions .codecov.yml
Expand Up @@ -4,7 +4,7 @@ codecov:
coverage:
precision: 2
round: down
range: '50...100'
range: "50...100"

parsers:
gcov:
Expand All @@ -15,6 +15,6 @@ parsers:
macro: no

comment:
layout: 'reach,diff,flags,files,footer'
layout: "reach,diff,flags,files,footer"
behavior: default
require_changes: no
42 changes: 25 additions & 17 deletions .eslintrc.js
@@ -1,12 +1,17 @@
module.exports = {
root: true,
reportUnusedDisableDirectives: true,
extends: ['eslint:recommended', 'plugin:node/recommended', 'plugin:prettier/recommended', 'prettier'],
parserOptions: { ecmaVersion: 2018, sourceType: 'script' },
plugins: ['node'],
extends: [
"eslint:recommended",
"plugin:node/recommended",
"plugin:prettier/recommended",
"prettier",
],
parserOptions: { ecmaVersion: 2018, sourceType: "script" },
plugins: ["node"],
settings: {
node: {
allowModules: ['@webpack-cli/generators'],
allowModules: ["@webpack-cli/generators"],
},
},
env: {
Expand All @@ -15,27 +20,30 @@ module.exports = {
jest: true,
},
rules: {
quotes: ['error', 'single', { avoidEscape: true, allowTemplateLiterals: false }],
'no-process-exit': 'off',
'no-template-curly-in-string': 'error',
'no-caller': 'error',
'no-extra-bind': 'error',
'no-loop-func': 'error',
'no-undef': 'error',
"no-process-exit": "off",
"no-template-curly-in-string": "error",
"no-caller": "error",
"no-extra-bind": "error",
"no-loop-func": "error",
"no-undef": "error",
},
overrides: [
{
settings: {
node: {
tryExtensions: ['.ts', '.tsx', '.js', '.jsx', '.json'],
tryExtensions: [".ts", ".tsx", ".js", ".jsx", ".json"],
},
},
files: ['**/*.ts'],
extends: ['plugin:@typescript-eslint/eslint-recommended', 'plugin:@typescript-eslint/recommended', 'prettier'],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
files: ["**/*.ts"],
extends: [
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"prettier",
],
parser: "@typescript-eslint/parser",
plugins: ["@typescript-eslint"],
rules: {
'node/no-unsupported-features/es-syntax': 'off',
"node/no-unsupported-features/es-syntax": "off",
},
},
],
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/Bug_report.md
@@ -1,7 +1,7 @@
---
name: "[BUG]: \U0001F41EReport"
about: "Template for \U0001F98E's you encounter with webpack-cli"
labels: 'Bug'
labels: "Bug"
---

**Describe the bug**
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/Feature_request.md
@@ -1,7 +1,7 @@
---
name: "[FEATURE]: Feature request \U0001F914"
about: "Suggest ideas you wish webpack-cli had \U0001F680"
labels: 'Feature Request'
labels: "Feature Request"
---

**Is your feature request related to a problem? Please describe.**
Expand Down
4 changes: 2 additions & 2 deletions .github/dependabot.yml
@@ -1,10 +1,10 @@
version: 2
updates:
- package-ecosystem: npm
directory: '/'
directory: "/"
schedule:
interval: daily
time: '04:00'
time: "04:00"
timezone: Europe/Berlin
open-pull-requests-limit: 10
versioning-strategy: lockfile-only
4 changes: 2 additions & 2 deletions .github/workflows/nodejs.yml
Expand Up @@ -12,7 +12,7 @@ on:
workflow_dispatch:
inputs:
tags:
description: 'Test description'
description: "Test description"

jobs:
lint:
Expand Down Expand Up @@ -115,7 +115,7 @@ jobs:

- uses: actions/setup-node@v1
with:
node-version: '12.x'
node-version: "12.x"

- run: npm install

Expand Down
2 changes: 1 addition & 1 deletion commitlint.config.js
@@ -1,3 +1,3 @@
module.exports = {
extends: ['@commitlint/config-conventional'],
extends: ["@commitlint/config-conventional"],
};
35 changes: 20 additions & 15 deletions jest.config.js
@@ -1,25 +1,30 @@
const { cli } = require('webpack');
const { cli } = require("webpack");

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

module.exports = {
testPathIgnorePatterns: ignorePattern,
testEnvironment: 'node',
testEnvironment: "node",
collectCoverage: true,
coverageDirectory: '.nyc_output',
coverageReporters: ['json'],
coveragePathIgnorePatterns: ['<rootDir>/test/'],
coverageDirectory: ".nyc_output",
coverageReporters: ["json"],
coveragePathIgnorePatterns: ["<rootDir>/test/"],
transform: {
'^.+\\.(ts)?$': 'ts-jest',
"^.+\\.(ts)?$": "ts-jest",
},
testRegex: ['/test/.*\\.(test.js|test.ts)$'],
moduleFileExtensions: ['ts', 'js', 'json'],
snapshotResolver: '<rootDir>/scripts/snapshotResolver.js',
watchPlugins: ['jest-watch-typeahead/filename', 'jest-watch-typeahead/testname'],
setupFilesAfterEnv: ['<rootDir>/setupTest.js'],
globalTeardown: '<rootDir>/scripts/cleanupTest.js',
globalSetup: '<rootDir>/scripts/globalSetup.js',
modulePathIgnorePatterns: ['<rootDir>/test/loader/test-loader', '<rootDir>/test/plugin/test-plugin'],
testRegex: ["/test/.*\\.(test.js|test.ts)$"],
moduleFileExtensions: ["ts", "js", "json"],
snapshotResolver: "<rootDir>/scripts/snapshotResolver.js",
watchPlugins: ["jest-watch-typeahead/filename", "jest-watch-typeahead/testname"],
setupFilesAfterEnv: ["<rootDir>/setupTest.js"],
globalTeardown: "<rootDir>/scripts/cleanupTest.js",
globalSetup: "<rootDir>/scripts/globalSetup.js",
modulePathIgnorePatterns: [
"<rootDir>/test/loader/test-loader",
"<rootDir>/test/plugin/test-plugin",
],
};
4 changes: 2 additions & 2 deletions lint-staged.config.js
@@ -1,4 +1,4 @@
module.exports = {
'*.{json,md,yml,css}': ['prettier --write'],
'*.{js,ts}': ['eslint --fix', 'prettier --write'],
"*.{json,md,yml,css}": ["prettier --write"],
"*.{js,ts}": ["eslint --fix", "prettier --write"],
};

0 comments on commit 181295f

Please sign in to comment.