Git Product home page Git Product logo

swc-plugin-ignore-import's Introduction

SWC plugin to ignore and remove certain imports based on configuration

Node.js v20 CI Code Smells

Inspired from https://www.npmjs.com/package/babel-plugin-ignore-import and since I needed this functionality, as it was blocker was moving to SWC.

const swc = require("@swc/core");
const PluginIgnoreImport = require("swc-plugin-ignore-import").default;

const { code } = swc.transformSync(src, {
  filename: "source-file-name-for-sourcemap.js",
  sourceMaps: true,
  jsc: {
    parser: {
      syntax: "ecmascript",
    },
    target: "es2015",
  },
  plugin: (m) =>
    new PluginIgnoreImport({
      pattern: /\.s?css$/,
    }).visitProgram(m),
});

Code style

npx prettier --write index.ts

Version history

Changes happening across different versions and upcoming changes are tracked in the CHANGELOG.md file.

License

Licensed under the MIT license.

Copyright (c) Juga Paazmaya [email protected]

swc-plugin-ignore-import's People

Contributors

renovate[bot] avatar paazmaya avatar renovate-bot avatar

Watchers

 avatar James Cloos avatar  avatar

swc-plugin-ignore-import's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/linting-and-unit-testing.yml
  • actions/checkout v4
  • actions/setup-node v4
npm
package.json
  • @swc/core 1.5.24
  • @swc/jest 0.2.36
  • @tsconfig/node16 16.1.3
  • @types/node 20.14.1
  • @typescript-eslint/eslint-plugin 6.21.0
  • @typescript-eslint/parser 6.21.0
  • eslint 8.57.0
  • eslint-config-paazmaya 9.0.1
  • jest 29.7.0
  • typescript 5.4.5
  • @swc/core ^1.3.21
  • node >=16.13.0
  • npm >=8.1.0

  • Check this box to trigger a request for Renovate to run again on this repository

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.