-
Notifications
You must be signed in to change notification settings - Fork 799
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds base ESLint configuration to the wpcomsh plugin. (#39275)
* Added a base JS eslint config. * ESLint fixes for classic-background-stats.js * Color.js fixes for eslint. * Eslint fixes for colors-control-beta.js. * Eslint fixes for colors-control.js. * Eslint fixes for colors-theme-preview.js * Eslint auto-fixes for customizer-labels-site-not-launched.js. * Eslint auto-fixes for footer-credit control.js. * Eslint auto-fixes for gifting-banner.js * Eslint fixes for logo tool customizer JS. * Adding eslintignore. * Eslint fixes for music-player.js. * Eslint fixes for tlkio.js * Changeloge. * Properly using ESLintrc file * Update projects/plugins/wpcomsh/custom-colors/js/color.js * Removed unused function, added URI component encoding. * Update projects/plugins/wpcomsh/custom-colors/js/color.js
- Loading branch information
Showing
14 changed files
with
525 additions
and
514 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Not loaded by default eslint, but we use tools/js-tools/load-eslint-ignore.js in .eslintrc to pull it in. | ||
|
||
/tests/e2e | ||
/custom-colors/js/jquery.spin.js | ||
/custom-colors/js/spin.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,13 @@ | ||
const loadIgnorePatterns = require( 'jetpack-js-tools/load-eslint-ignore.js' ); | ||
|
||
module.exports = { | ||
root: true, | ||
extends: [ | ||
require.resolve( 'jetpack-js-tools/eslintrc/jest' ), | ||
require.resolve( 'jetpack-js-tools/eslintrc/prettier' ), | ||
], | ||
ignorePatterns: loadIgnorePatterns( __dirname ), | ||
overrides: [], | ||
env: { | ||
browser: true, | ||
jest: true, | ||
node: true, | ||
}, | ||
parserOptions: { | ||
ecmaVersion: 2020, | ||
}, | ||
globals: {}, | ||
settings: {}, | ||
rules: { | ||
// Enforce use of the correct textdomain. | ||
'@wordpress/i18n-text-domain': [ | ||
'error', | ||
{ | ||
allowedTextDomain: 'wpcomsh', | ||
}, | ||
], | ||
|
||
'jest/no-disabled-tests': 'warn', | ||
'jest/no-focused-tests': 'error', | ||
'jest/no-identical-title': 'error', | ||
'jest/prefer-to-have-length': 'warn', | ||
'jest/valid-expect': 'error', | ||
}, | ||
}; |
4 changes: 4 additions & 0 deletions
4
projects/plugins/wpcomsh/changelog/add-wpcomsh-eslint-base-config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Significance: patch | ||
Type: changed | ||
|
||
Introduced ESLint base config and fixed errors. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.