Skip to content
Merged
4 changes: 0 additions & 4 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,4 @@ require( '@rushstack/eslint-patch/modern-module-resolution' );

module.exports = {
extends: [ './config/eslintrc.js' ],
ignorePatterns: [ 'node_modules' ],
rules: {
'@typescript-eslint/no-var-requires': 'off',
},
};
5 changes: 5 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
const baseConfig = require( './config/prettier.config.js' );

module.exports = {
...baseConfig
};
8 changes: 4 additions & 4 deletions bin/newspack-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ if (
if ( result.signal === 'SIGKILL' ) {
utils.log(
'The build failed because the process exited too early. ' +
'This probably means the system ran out of memory or someone called ' +
'`kill -9` on the process.'
'This probably means the system ran out of memory or someone called ' +
'`kill -9` on the process.'
);
} else if ( result.signal === 'SIGTERM' ) {
utils.log(
'The build failed because the process exited too early. ' +
'Someone might have called `kill` or `killall`, or the system could ' +
'be shutting down.'
'Someone might have called `kill` or `killall`, or the system could ' +
'be shutting down.'
);
}
process.exit( 1 );
Expand Down
6 changes: 2 additions & 4 deletions config/babel.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
module.exports = api => {
module.exports = ( api ) => {
api.cache( true );
return {
presets: [
'@wordpress/babel-preset-default',
],
presets: [ '@wordpress/babel-preset-default' ],
};
};
15 changes: 3 additions & 12 deletions config/eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
const wpRecommended = require.resolve(
'@wordpress/eslint-plugin/configs/recommended'
);
const reactRecommended = require.resolve(
'@wordpress/eslint-plugin/configs/react'
);

/**
* Assume `@wordpress/*` packages are available. This is because `@wordpress/scripts` is using
* Dependency Extraction Webpack Plugin to use core WP packages instead of those from
Expand All @@ -23,17 +16,14 @@ module.exports = {
extends: [
'plugin:import/errors',
'plugin:import/warnings',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
reactRecommended,
wpRecommended,
'plugin:@wordpress/eslint-plugin/recommended',
'plugin:@wordpress/eslint-plugin/react',
],
env: {
browser: true,
jest: true,
},
parser: '@typescript-eslint/parser',
plugins: [ '@typescript-eslint' ],
settings: {
'import/resolver': {
node: {
Expand Down Expand Up @@ -85,5 +75,6 @@ module.exports = {
'@typescript-eslint/no-shadow': 'error',
'@typescript-eslint/ban-ts-comment': 'warn',
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/no-require-imports': 'off',
},
};
2 changes: 1 addition & 1 deletion config/getWebpackConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module.exports = ( ...args ) => {
let config = { ...defaultConfig };

// Merge config extensions into default config.
args.forEach( extension => {
args.forEach( ( extension ) => {
config = { ...config, ...extension };
} );

Expand Down
7 changes: 3 additions & 4 deletions config/stylelint.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
module.exports = {
extends: [
'@wordpress/stylelint-config',
],
extends: [ '@wordpress/stylelint-config' ],
ignoreFiles: [ 'dist/**', 'node_modules/**', 'release/**', 'scripts/**' ],
rules: {
'rule-empty-line-before': null,
'at-rule-empty-line-before': null,
Expand All @@ -16,6 +15,7 @@ module.exports = {
'alpha-value-notation': null,
'color-function-notation': null,
'selector-not-notation': null,
'no-invalid-double-slash-comments': null,
'function-no-unknown': [
true,
{
Expand All @@ -29,6 +29,5 @@ module.exports = {
},
],
'media-feature-range-notation': null,
'max-line-length': null,
},
};
Loading