Skip to content
Open
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
6 changes: 0 additions & 6 deletions .eslintignore

This file was deleted.

30 changes: 0 additions & 30 deletions .eslintrc.json

This file was deleted.

2 changes: 1 addition & 1 deletion css/cloudinary.css

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions css/gallery-ui.css

Large diffs are not rendered by default.

74 changes: 74 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
const globals = require( 'globals' );
const wpPlugin = require( '@wordpress/eslint-plugin' );

// eslint-import-resolver-typescript v4+ is incompatible with eslint-plugin-import
// (throws "invalid interface loaded as resolver"), and this project has no TypeScript
// anyway, so strip the typescript resolver that @wordpress/eslint-plugin configures.
const recommended = wpPlugin.configs.recommended.map( ( config ) => {
if ( ! config.settings || ! config.settings[ 'import/resolver' ] ) {
return config;
}
const { typescript, ...resolver } = config.settings[ 'import/resolver' ];
return {
...config,
settings: {
...config.settings,
'import/resolver': resolver,
},
};
} );

module.exports = [
{
ignores: [
'**/build/**',
'**/built/**',
'**/node_modules/**',
'**/vendor/**',
'js/**',
'**/*.min.js',
// Vendored third-party library (https://github.com/kallookoo/wp-color-picker-alpha).
'src/js/wp-color-picker-alpha.js',
],
},
...recommended,
{
settings: {
'import/resolver': {
node: true,
},
},
languageOptions: {
globals: {
...globals.browser,
cloudinary: 'readonly',
jQuery: 'readonly',
$: 'readonly',
CLDN: 'readonly',
CLDLB: 'readonly',
CLD_GLOBAL_TRANSFORMATIONS: 'readonly',
samplePlayer: 'readonly',
CLDCACHE: 'readonly',
cldData: 'readonly',
CLD_METADATA: 'readonly',
CLDASSETS: 'readonly',
},
},
rules: {
'no-alert': 'off',
'no-console': 'off',
'no-unused-vars': 'off',
'no-nested-ternary': 'off',
'jsx-a11y/click-events-have-key-events': 'off',
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'warn',
'@wordpress/no-global-event-listener': 'off',
// CLD_Deactivate is a wp_localize_script object name (php/class-deactivation.php);
// renaming it would require a matching PHP-side change.
camelcase: [
'error',
{ properties: 'never', allow: [ '^CLD_Deactivate$' ] },
],
},
},
];
2 changes: 1 addition & 1 deletion js/asset-edit.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/asset-manager.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/block-editor.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('wp-api-fetch', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => 'aab7b2e0606348e43cc2');
<?php return array('dependencies' => array('wp-api-fetch', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '558667256f0d3fc475cd');
2 changes: 1 addition & 1 deletion js/block-editor.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading