Code Monkey home page Code Monkey logo

enonic-npm-modules's Introduction

enonic npm modules

Basic rules, styles and data shared across apps and libs.

Coverage Status

Usage

enonic-npm-modules is a monorepo, that contains several developer tools to help building:

To install all dependencies in all packages, simply run npm install (will run lerna bootstrap afterwards).

Publishing

Before publishing the changes in any package, read the manual.

License

GPL-3.0 © enonic

enonic-npm-modules's People

Contributors

alansemenov avatar comlock avatar dependabot-preview[bot] avatar dependabot[bot] avatar edloidas avatar pull-merger[bot] avatar rymsha avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

enonic-npm-modules's Issues

Add constructor-super ESLint rule to typescript

As was discovered during build optimization, ESLint config for the typescript does not include the constructor-super rule, while the ES does. It's not necessary when you compile your code with tsc, but using tools like swc may lead to errors, as not all paths will initialize _this variable (tsc will do var _this = this; at the top of the constructor function).
It is important to have this rule if we want to use swc on our TS projects.

Tests are failing in eslint-config package

Tests are failing in eslint-config package when running npm test in the root:

 FAIL  packages/eslint-config/test/eslint.test.ts
  ● Default › eslint-config

    Failed to load plugin '@typescript-eslint' declared in 'CLIOptions#overrides[0] » /Users/ase/dev/enonic-npm-modules/packages/eslint-config/typescript.js': Cannot find module 'eslint/use-at-your-own-risk' from 'node_modules/@typescript-eslint/eslint-plugin/dist/util/getESLintCoreRule.js'

    Require stack:
      node_modules/@typescript-eslint/eslint-plugin/dist/rules/brace-style.js
      node_modules/@typescript-eslint/eslint-plugin/dist/rules/index.js
      node_modules/@typescript-eslint/eslint-plugin/dist/index.js
      packages/eslint-config/node_modules/@eslint/eslintrc/dist/eslintrc.cjs
      packages/eslint-config/node_modules/eslint/lib/cli-engine/cli-engine.js
      packages/eslint-config/node_modules/eslint/lib/eslint/eslint.js
      packages/eslint-config/node_modules/eslint/lib/eslint/index.js
      packages/eslint-config/node_modules/eslint/lib/api.js
      packages/eslint-config/test/eslint.test.ts

    Referenced from: /Users/ase/dev/enonic-npm-modules/packages/eslint-config/typescript.js

      at Resolver.resolveModule (node_modules/jest-resolve/build/index.js:306:11)
      at node_modules/@typescript-eslint/eslint-plugin/src/util/getESLintCoreRule.ts:48:11
      at Object.<anonymous> (node_modules/@typescript-eslint/eslint-plugin/src/rules/brace-style.ts:10:35)

  ● Standalone configs › eslint-config/typescript

    Failed to load config "plugin:@typescript-eslint/eslint-recommended" to extend from.
    Referenced from: CLIOptions

       7 |
       8 | async function runEslint(code: string, overrideConfig: Linter.ConfigOverride, filePath?: string): Promise<Linter.LintMessage[]> {
    >  9 |   const eslint = new ESLint({useEslintrc: false, overrideConfig});
         |                  ^
      10 |
      11 |   const [{messages}] = await eslint.lintText(code, {filePath});
      12 |

      at configInvalidError (packages/eslint-config/node_modules/@eslint/eslintrc/lib/config-array-factory.js:299:9)
      at ConfigArrayFactory._loadExtendedPluginConfig (packages/eslint-config/node_modules/@eslint/eslintrc/lib/config-array-factory.js:884:31)
      at ConfigArrayFactory._loadExtends (packages/eslint-config/node_modules/@eslint/eslintrc/lib/config-array-factory.js:792:29)
      at ConfigArrayFactory._normalizeObjectConfigDataBody (packages/eslint-config/node_modules/@eslint/eslintrc/lib/config-array-factory.js:733:25)
          at _normalizeObjectConfigDataBody.next (<anonymous>)
      at ConfigArrayFactory._normalizeObjectConfigData (packages/eslint-config/node_modules/@eslint/eslintrc/lib/config-array-factory.js:678:20)
          at _normalizeObjectConfigData.next (<anonymous>)
      at ConfigArrayFactory.create (packages/eslint-config/node_modules/@eslint/eslintrc/lib/config-array-factory.js:473:16)
      at createCLIConfigArray (packages/eslint-config/node_modules/@eslint/eslintrc/lib/cascading-config-array-factory.js:168:47)
      at CascadingConfigArrayFactory.clearCache (packages/eslint-config/node_modules/@eslint/eslintrc/lib/cascading-config-array-factory.js:340:32)
      at new ESLint (packages/eslint-config/node_modules/eslint/lib/eslint/eslint.js:448:32)
      at packages/eslint-config/test/eslint.test.ts:9:18
      at step (packages/eslint-config/test/eslint.test.ts:44:23)
      at Object.next (packages/eslint-config/test/eslint.test.ts:25:53)
      at packages/eslint-config/test/eslint.test.ts:19:71
      at Object.<anonymous>.__awaiter (packages/eslint-config/test/eslint.test.ts:15:12)
      at runEslint (packages/eslint-config/test/eslint.test.ts:55:12)
      at packages/eslint-config/test/eslint.test.ts:47:26
      at step (packages/eslint-config/test/eslint.test.ts:44:23)
      at Object.next (packages/eslint-config/test/eslint.test.ts:25:53)
      at packages/eslint-config/test/eslint.test.ts:19:71
      at Object.<anonymous>.__awaiter (packages/eslint-config/test/eslint.test.ts:15:12)
      at Object.<anonymous> (packages/eslint-config/test/eslint.test.ts:39:36)

Test Suites: 1 failed, 7 passed, 8 total
Tests:       2 failed, 24 passed, 26 total
Snapshots:   0 total
Time:        5.539 s

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.