eslint-plugin-decorator-position icon indicating copy to clipboard operation
eslint-plugin-decorator-position copied to clipboard

adds eslint testing skeleton

Open basz opened this issue 1 year ago • 10 comments

hey

I honestly have now clue what to put exactly into folder 721. Tests dont run locally (macos) (find: -printf: unknown primary or operator). Ive use a utility to generate a 'flat' config, i think...

so pls consider this a nice try.. yet failed...

basz avatar Jun 21 '24 11:06 basz

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

⚠️ No Changeset found

Latest commit: e7c2e388e9b99034ab7875cae510a0db9c4f2c42

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

changeset-bot[bot] avatar Jun 21 '24 11:06 changeset-bot[bot]

Looks like we have:

PWD: /home/runner/work/eslint-plugin-decorator-position/eslint-plugin-decorator-position/smoke-tests/issue-reproductions/721
Invalid option '--eslintrc' - perhaps you meant '--ignore'?
You're using eslint.config.js, some command line flags are no longer available. Please see https://eslint.org/docs/latest/use/command-line-interface for details.

Which means that the test runner scripts will need updated:

  • https://github.com/NullVoxPopuli/eslint-plugin-decorator-position/blob/main/scripts/-pnpm.sh#L40
  • and: https://github.com/NullVoxPopuli/eslint-plugin-decorator-position/blob/main/scripts/-yarn.sh#L43

to probably have some if eslint 9 check, and use the newer CLI args / flags

NullVoxPopuli avatar Jun 21 '24 20:06 NullVoxPopuli

Tests dont run locally (macos) (find: -printf: unknown primary or operator)

The workaround for this on MacOS is to install GNU find, gfind, and update the script.

brew install gfind

Then in smoke-test.sh, update line 21:

  smoke_tests=$(gfind $TEST_DIR \

That should allow you to run it locally.

tcjr avatar Jul 09 '24 15:07 tcjr

brew install findutils, but yeah. thx!

basz avatar Jul 11 '24 15:07 basz

I think the only remaining peer dependancy that is failing currently for comes from https://github.com/NullVoxPopuli/eslint-plugin-decorator-position/issues/721

a seconds test run with ./scripts/smoke-test.sh smoke-tests/issue-reproductions/721 Select Test: issue-reproductions/721

yield a different result that I'm having a hard time intepreting

Changing to smoke-tests/issue-reproductions/721
Running tests for smoke-tests/issue-reproductions/721 with pnpm


Linking to /Users/bas/Sandbox/eslint-plugin-decorator-position from smoke-tests/issue-reproductions/721
../../..                                 | +563 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
../../..                                 | Progress: resolved 563, reused 563, downloaded 0, added 0, done
 WARN  The package eslint-plugin-decorator-position, which you have just pnpm linked, has the following peerDependencies specified in its package.json:

  - @babel/eslint-parser@^7.18.2,   - eslint@^6.0.0 || ^7.31.0 || ^8.0.0

The linked in dependency will not resolve the peer dependencies from the target node_modules.
This might cause issues in your project. To resolve this, you may use the "file:" protocol to reference the local dependency.

dependencies:
+ eslint-plugin-decorator-position 5.0.2 <- ../../..
Lockfile is up to date, resolution step is skipped
Already up to date
Done in 324ms


Legend: production dependency, optional only, dev only

[email protected] /Users/bas/Sandbox/eslint-plugin-decorator-position/smoke-tests/issue-reproductions/721

dependencies:
eslint 9.10.0
Legend: production dependency, optional only, dev only

[email protected] /Users/bas/Sandbox/eslint-plugin-decorator-position/smoke-tests/issue-reproductions/721

dependencies:
prettier 3.3.2
/Users/bas/Sandbox/eslint-plugin-decorator-position/smoke-tests/issue-reproductions/721/node_modules/.bin
/Users/bas/Sandbox/eslint-plugin-decorator-position/smoke-tests/issue-reproductions/721/node_modules/.bin


PWD: /Users/bas/Sandbox/eslint-plugin-decorator-position/smoke-tests/issue-reproductions/721
Invalid option '--eslintrc' - perhaps you meant '--ignore'?
You're using eslint.config.js, some command line flags are no longer available. Please see https://eslint.org/docs/latest/use/command-line-interface for details.

basz avatar Sep 18 '24 09:09 basz

Doh, looks like ci broke. I'll fix, then we can rebase

NullVoxPopuli avatar Sep 18 '24 11:09 NullVoxPopuli

now ready for rebase -- CI should start running properly, so we can get more meaningful info from it

NullVoxPopuli avatar Sep 18 '24 13:09 NullVoxPopuli

Does ESLint9 only support node 18?

looks like: image

so, we'll need to skip the matrix scenarios for eslint 9 < node 18

NullVoxPopuli avatar Sep 18 '24 16:09 NullVoxPopuli

I'm extracting the CI changes here: https://github.com/NullVoxPopuli/eslint-plugin-decorator-position/pull/726 -- and then I can also try to make the peer situation more robust -- as I've learned a good few techniques for what's needed here since the initial test setup was created

NullVoxPopuli avatar Sep 18 '24 18:09 NullVoxPopuli

This is no longer needed, apologies. Your work was valuable towards landing eslint 9 support though!

NullVoxPopuli avatar Nov 11 '24 21:11 NullVoxPopuli

not a problem!

basz avatar Nov 12 '24 13:11 basz