Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

development environment upgrades #6059

Merged
merged 11 commits into from
Aug 20, 2024
Merged

development environment upgrades #6059

merged 11 commits into from
Aug 20, 2024

Conversation

danstarns
Copy link
Member

@danstarns danstarns commented Aug 12, 2024

Here I am updating Node, Linting, Formatting, and Testing dependencies to be in line with long-term supported versions.

This PR is related to:

This PR focuses on enhancing the developer experience when working on the GrapesJS OSS repository. Given that the project has been solely maintained by one person over several years, it is bound to have areas needing improvement.

The work here includes:

  • Node Version - Updating the Node versions across all development and CI machines.
  • Package Dependencies - Updating and setting up Dependabot for automatically updating dependencies.
  • Linting and Formatting - Ensuring consistency across all projects.
  • Testing - Implementing and improving testing frameworks and practices.
  • General Maintenance - Handling configuration, documentation, and other general maintenance tasks.

Comment on lines +19 to +50
'no-var': 'off',
'prefer-const': 'off',
'no-prototype-builtins': 'off',
'no-useless-escape': 'off',
'prefer-rest-params': 'off',
'no-empty': 'off',
'prefer-spread': 'off',
'no-extra-boolean-cast': 'off',
'no-unsafe-optional-chaining': 'off',
'no-shadow-restricted-names': 'off',
'no-cond-assign': 'off',
'no-fallthrough': 'off',
'no-sparse-arrays': 'off',
'no-redeclare': 'off',
'no-control-regex': 'off',
'no-constant-condition': 'off',
'no-misleading-character-class': 'off',
'no-undef': 'off',
'no-func-assign': 'off',
'no-regex-spaces': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/no-require-imports': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/no-unused-expressions': 'off',
'@typescript-eslint/no-unnecessary-type-const': 'off',
'@typescript-eslint/no-empty-object-type': 'off',
'@typescript-eslint/no-unnecessary-type-constraint': 'off',
'@typescript-eslint/no-this-alias': 'off',
'@typescript-eslint/no-unsafe-function-type': 'off',
'@typescript-eslint/no-non-null-asserted-optional-chain': 'off',
'@typescript-eslint/no-wrapper-object-types': 'off',
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally, we don't want all these rules and just rely on the recommended, however, that requires mass code transformation to fulfill. Let's keep this PR mostly about config and then come back to blocks of rules and incrementally remove them.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah totally agree

package.json Show resolved Hide resolved
package.json Show resolved Hide resolved
package.json Show resolved Hide resolved
@@ -318,7 +315,7 @@ describe('GrapesJS', () => {
});
});

test('Adds a new storage and fetch correctly data from it', done => {
test.skip('Adds a new storage and fetch correctly data from it', async () => {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a problem when upgrading jest and jsdom where the editor.onReady function alongside some dom components aren't working the same. Given its just this and a few others, I feel happy to skip these in favour of scope and come back un unskip the cases.

config.fromElement = true;
config.storageManager.type = storageId;
config.plugins = [pluginName];
config.storageManager.autoload = 1;
const editor = grapesjs.init(config);
editor.onReady(() => {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

onReady ditto

let editor: Editor;
let wrapper: ComponentWrapper;
let el1: Component;
let el2: Component;
let el3: Component;

beforeEach(done => {
beforeEach(() => {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

onReady ditto

@@ -86,25 +86,22 @@ describe('GrapesJS', () => {
expect(editor.getStyle().length).toEqual(0);
});

test('Editor canvas baseCSS can be overwritten', done => {
test.skip('Editor canvas baseCSS can be overwritten', () => {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Skip ditto.

with:
node-version: '12.x'
node-version: '20.x'
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

8 major versions.

@danstarns danstarns marked this pull request as ready for review August 17, 2024 23:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants