Git Product home page Git Product logo

eslint-plugin-node-import's People

Contributors

ai avatar azat-io avatar kytta avatar maranomynet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

ai maranomynet

eslint-plugin-node-import's Issues

TypeError: Cannot read properties of null (reading 'value')

I got an error

TypeError: Cannot read properties of null (reading 'value')
Occurred while linting /home/ai/Dev/browsersl.ist/client/data/regions.js:4
Rule: "node-import/prefer-node-protocol"
    at literalVisitor (/home/ai/Dev/browsersl.ist/node_modules/.pnpm/[email protected][email protected]/node_modules/eslint-plugin-node-import/lib/rules/prefer-node-protocol.js:24:22)

on the code:

// regions.json is created on `postinstall` step
import { continents, countryCodes } from './regions.json'

export const DEFAULT_REGION = 'alt-ww' // <= here is a problem

Bun support?

I was wondering if and how this plugin would work with bun (https://bun.sh) — which just reached v1.0.0 today.

$ bun repl
Welcome to Bun v1.0.0
Type ".help" for more information.
> const { builtinModules } = require("node:module");
undefined
> builtinModules
[
  '_http_agent',         '_http_client',        '_http_common',
  '_http_incoming',      '_http_outgoing',      '_http_server',
  '_stream_duplex',      '_stream_passthrough', '_stream_readable',
  '_stream_transform',   '_stream_wrap',        '_stream_writable',
  '_tls_common',         '_tls_wrap',           'assert',
  'assert/strict',       'async_hooks',         'buffer',
  'bun',                 'bun:ffi',             'bun:jsc',
  'bun:sqlite',          'bun:wrap',            'child_process',
  'cluster',             'console',             'constants',
  'crypto',              'detect-libc',         'dgram',
  'diagnostics_channel', 'dns',                 'dns/promises',
  'domain',              'events',              'fs',
  'fs/promises',         'http',                'http2',
  'https',               'inspector',           'inspector/promises',
  'module',              'net',                 'os',
  'path',                'path/posix',          'path/win32',
  'perf_hooks',          'process',             'punycode',
  'querystring',         'readline',            'readline/promises',
  'repl',                'stream',              'stream/consumers',
  'stream/promises',     'stream/web',          'string_decoder',
  'sys',                 'timers',              'timers/promises',
  'tls',                 'trace_events',        'tty',
  'undici',              'url',                 'util',
  'util/types',          'v8',                  'vm',
  'wasi',                'worker_threads',      'ws',
  'zlib'
]

whereas node has this list:

$ node
Welcome to Node.js v20.5.1.
Type ".help" for more information.
> const { builtinModules } = require("node:module");
undefined
> builtinModules
[
  '_http_agent',         '_http_client',        '_http_common',
  '_http_incoming',      '_http_outgoing',      '_http_server',
  '_stream_duplex',      '_stream_passthrough', '_stream_readable',
  '_stream_transform',   '_stream_wrap',        '_stream_writable',
  '_tls_common',         '_tls_wrap',           'assert',
  'assert/strict',       'async_hooks',         'buffer',
  'child_process',       'cluster',             'console',
  'constants',           'crypto',              'dgram',
  'diagnostics_channel', 'dns',                 'dns/promises',
  'domain',              'events',              'fs',
  'fs/promises',         'http',                'http2',
  'https',               'inspector',           'inspector/promises',
  'module',              'net',                 'os',
  'path',                'path/posix',          'path/win32',
  'perf_hooks',          'process',             'punycode',
  'querystring',         'readline',            'readline/promises',
  'repl',                'stream',              'stream/consumers',
  'stream/promises',     'stream/web',          'string_decoder',
  'sys',                 'timers',              'timers/promises',
  'tls',                 'trace_events',        'tty',
  'url',                 'util',                'util/types',
  'v8',                  'vm',                  'wasi',
  'worker_threads',      'zlib'
]

So it seems that bun's modules are all, either prefixed with bun: or simply called bun.

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.