Skip to content

Conversation

jmthibault79
Copy link
Collaborator

Some rules are compatible with Prettier, some are incompatible, and some are redundant to it.


PR checklist

  • This PR meets the Acceptance Criteria in the JIRA story
  • The JIRA story has been moved to Dev Review
  • This PR includes appropriate unit tests
  • I have run and tested this change locally
  • I have run the E2E tests on ths change against my local UI and/or API server with yarn test-local or yarn test-local-devup
  • If this includes a UI change, I have taken screen recordings or screenshots of the new behavior and notified the PO and UX designer
  • If this includes an API change, I have updated the appropriate Swagger definitions and notified API consumers
  • If this includes a new feature flag, I have created and linked new JIRA tickets to (a) turn on the feature flag and (b) remove it later

'prettier',
'react',
'react-hooks',
'simple-import-sort',
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

remove for now; I have a speculative follow-on PR to re-enable.

'react',
'react-hooks',
'simple-import-sort',
'sort-keys-fix',
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

whatever this was, we no longer refer to it

'@typescript-eslint/prefer-optional-chain': 'warn',
'@typescript-eslint/unified-signatures': 'warn',
// '@typescript-eslint/member-ordering': ['warn', { 'classExpressions': ['method', 'field'] }],
// '@typescript-eslint/prefer-function-type': 'warn',
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I judged these to be more "functional" than "style" so I moved them to this section


'prettier/prettier': 'warn',

'max-len': [
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

These 2 are compatible and non-redundant to Prettier


// temp disable others. re-enable if desired after determining that they don't conflict with prettier.

// 'eol-last': 'warn',
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

redundant

// 'eol-last': 'warn',
// 'max-len': ['warn', {code: 140, ignorePattern: '^import |^export\\{(.*?)\\}', ignoreComments: true}],
// 'no-trailing-spaces': 'warn',
// 'quotes': ['warn', 'single'],
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

redundant

// 'max-len': ['warn', {code: 140, ignorePattern: '^import |^export\\{(.*?)\\}', ignoreComments: true}],
// 'no-trailing-spaces': 'warn',
// 'quotes': ['warn', 'single'],
// // 'brace-style': ['warn', '1tbs'],
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

redundant

// 'no-trailing-spaces': 'warn',
// 'quotes': ['warn', 'single'],
// // 'brace-style': ['warn', '1tbs'],
// // 'no-multi-spaces': 'warn',
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

redundant

// // '@typescript-eslint/semi': 'warn',
//
// 'react/jsx-curly-spacing': ["warn", {'when': 'never'}],
// 'simple-import-sort/sort': 'warn',
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

deferred- these 2 are bigger changes, and maybe not desirable.

// // 'brace-style': ['warn', '1tbs'],
// // 'no-multi-spaces': 'warn',
// // 'simple-import-sort/sort': 'warn',
// // 'space-before-function-paren': ['warn', { 'anonymous': 'never', 'named': 'never', 'asyncArrow': 'always' }],
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

incompatible

// // 'space-before-function-paren': ['warn', { 'anonymous': 'never', 'named': 'never', 'asyncArrow': 'always' }],
// // 'spaced-comment': 'warn',
//
// '@typescript-eslint/type-annotation-spacing': 'warn',
Copy link
Collaborator Author

@jmthibault79 jmthibault79 Jan 24, 2022

Choose a reason for hiding this comment

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

redundant

// '@typescript-eslint/prefer-function-type': 'warn',
// // '@typescript-eslint/semi': 'warn',
//
// 'react/jsx-curly-spacing': ["warn", {'when': 'never'}],
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

redundant

if (enablePd) {
return;
it(
'should set runtime preset values in customize panel instead of getRuntime values ' +
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

line was too long

);

it(
'should set runtime preset values in customize panel instead of getRuntime values ' +
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

line was too long

CdrVersionsStubVariables.DEFAULT_WORKSPACE_CDR_VERSION_ID
);

const expectedUpgradeMessage = `${CdrVersionsStubVariables.ALT_WORKSPACE_CDR_VERSION} to ${CdrVersionsStubVariables.DEFAULT_WORKSPACE_CDR_VERSION}.`;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

line too long

});

it('should return resource URLs', () => {
const WORKSPACE_URL_PREFIX = `/workspaces/${WorkspaceStubVariables.DEFAULT_WORKSPACE_NS}/${WorkspaceStubVariables.DEFAULT_WORKSPACE_ID}`;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

line too long

@jmthibault79 jmthibault79 requested a review from calbach January 24, 2022 19:35
Copy link
Contributor

@calbach calbach left a comment

Choose a reason for hiding this comment

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

thanks

@jmthibault79 jmthibault79 merged commit 2826627 into main Jan 24, 2022
@jmthibault79 jmthibault79 deleted the joel/eslint-style branch January 24, 2022 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants