How to use rollup-plugin-eslint - 9 common examples

To help you get started, we’ve selected a few rollup-plugin-eslint examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github VagnerDomingues / docsify-example-panels / rollup.config.js View on Github external
// Config
// =============================================================================
// Base
const config = {
    input : entryFile,
    output: {
        banner   : `/*!\n * ${ bannerData.join('\n * ') }\n */`,
        file     : outputFile,
        sourcemap: true
    },
    plugins: [
        resolve(),
        commonjs(),
        json(),
        postcss(pluginSettings.postcss),
        eslint(pluginSettings.eslint),
        babel(pluginSettings.babel)
    ],
    watch: {
        clearScreen: false
    }
};

// Formats
// -----------------------------------------------------------------------------
// IIFE
const iife = merge({}, config, {
    output: {
        format: 'iife'
    },
    plugins: config.plugins.concat([
        uglify(pluginSettings.uglify.beautify)
github jhildenbiddle / class-change / rollup.config.js View on Github external
// Config
// =============================================================================
// Base
const config = {
    input : entryFile,
    output: {
        file     : outputFile,
        name     : outputName,
        banner   : `/*!\n * ${ bannerData.join('\n * ') }\n */`,
        sourcemap: true
    },
    plugins: [
        resolve(),
        commonjs(),
        json(),
        eslint(pluginSettings.eslint),
        babel(pluginSettings.babel)
    ],
    watch: {
        clearScreen: false
    }
};

// Formats
// -----------------------------------------------------------------------------
// ES Module
const esm = merge({}, config, {
    output: {
        file  : config.output.file.replace(/\.js$/, '.esm.js'),
        format: 'esm'
    },
    plugins: [
github jhildenbiddle / css-vars-ponyfill / rollup.config.js View on Github external
// Config
// =============================================================================
// Base
const config = {
    input : entryFile,
    output: {
        file     : outputFile,
        name     : outputName,
        banner   : `/*!\n * ${ bannerData.join('\n * ') }\n */`,
        sourcemap: true
    },
    plugins: [
        resolve(),
        commonjs(),
        json(),
        eslint(pluginSettings.eslint),
        babel(pluginSettings.babel)
    ],
    watch: {
        clearScreen: false
    }
};

// Formats
// -----------------------------------------------------------------------------
// ES Module
const esm = merge({}, config, {
    output: {
        file  : config.output.file.replace(/\.js$/, '.esm.js'),
        format: 'esm'
    },
    plugins: config.plugins.concat([
github jhildenbiddle / canvas-size / rollup.config.js View on Github external
// Config
// =============================================================================
// Base
const config = {
    input : entryFile,
    output: {
        file     : outputFile,
        name     : outputName,
        banner   : `/*!\n * ${ bannerData.join('\n * ') }\n */`,
        sourcemap: true
    },
    plugins: [
        resolve(),
        commonjs(),
        json(),
        eslint(pluginSettings.eslint)
    ],
    watch: {
        clearScreen: false
    }
};

// Formats
// -----------------------------------------------------------------------------
// ES Module
const esm = merge({}, config, {
    output: {
        file  : config.output.file.replace(/\.js$/, '.esm.js'),
        format: 'esm'
    },
    plugins: config.plugins.concat([
        babel(pluginSettings.babel.es6),
github m5stack / m5-docs / rollup.config.js View on Github external
// Config
// =============================================================================
// Base
const config = {
    input : entryFile,
    output: {
        file     : outputFile,
        banner   : `/*!\n * ${ bannerData.join('\n * ') }\n */`,
        sourcemap: true
    },
    plugins: [
        resolve(),
        commonjs(),
        json(),
        eslint(pluginSettings.eslint),
        babel(pluginSettings.babel)
    ],
    watch: {
        clearScreen: false
    }
};

// Formats
// -----------------------------------------------------------------------------
// IIFE
const iife = merge({}, config, {
    output: {
        format: 'iife'
    },
    plugins: [
        uglify(pluginSettings.uglify.beautify)
github jonathanlevaillant / a11y-dialog-component / rollup.config.js View on Github external
// Required for demo bundle and development environment
const demo = {
  input: 'src/index.js',
  output: {
    file: 'demos/js/a11y-dialog-component.js',
    format: 'iife',
    name: 'Dialog',
    exports: 'named',
    sourcemap: true,
  },
  watch: {
    clearScreen: false,
  },
  plugins: [
    !production && eslint(),
    babel({
      exclude: 'node_modules/**',
    }),
  ],
};

production ? bundle.push(cjs, esm, iife, demo) : bundle.push(demo);

export default bundle;
github kbrsh / moon / build / build.js View on Github external
const nameExport = options.nameExport;
	const type = options.type;

	const comment = `${type === "executable" ? "#!/usr/bin/env node\n" : ""}/**
 * ${name} v${version}
 * Copyright 2016-2019 Kabir Shah
 * Released under the MIT License
 * https://kbrsh.github.io/moon
 */\r\n`;

	try {
		const bundle = await rollup.rollup({
			input: path.join(packagesPath, `${package}/src/index.js`),
			plugins: [
				resolver,
				eslint(),
				babel()
			],
			onwarn: warning => {
				if (warning.code !== "CIRCULAR_DEPENDENCY") {
					console.warn(`Rollup [Warn]: ${warning}`);
				}
			}
		});

		let { output } = await bundle.generate({
			name: nameExport,
			format: "iife"
		});

		output = output[0].code;
github jcmcneal / react-step-wizard / rollup.config.js View on Github external
file: `./dist/${path.basename(app.main)}`,
        format: 'umd',
        name: 'ReactStepWizard',
        exports: 'named',
        globals: {
            'prop-types': 'PropTypes',
            react: 'React',
        },
    },
    external: [
        'prop-types',
        'react',
    ],
    context: 'this',
    plugins: [
        isProd && eslint({
            throwOnError: true,
            throwOnWarning: true,
            exclude: ['node_modules/**', '**/**/*.less', '**/**/*.css'],
        }),
        babel({
            exclude: 'node_modules/**',
        }),
        postcss({
            modules: {
                generateScopedName: 'rsw_[hash:base64:2]',
            },
        }),
        isProd && uglify(),
        filesize(),
    ],
};
github peterver / vanilla-image-cropper / gulpfile.js View on Github external
return gulp.src(component.src)
        .pipe(
            rollup({
                input: component.entry,
                output: {
                    name: 'ImageCropper',
                    format: 'iife',
                },
                plugins: [
                    resolve({
                        jsnext: true,
                        main: true,
                        browser: true,
                    }),
                    commonjs(),
                    eslint('.eslintrc'),
                    babel({
                        presets: ['es2015-rollup'],
                        plugins : [
                            'check-es2015-constants',
                            'transform-minify-booleans',
                            'transform-property-literals',
                            'transform-member-expression-literals',
                        ]
                    }),
                    uglify()
                ],
            })
        )
        .pipe(rename({
            suffix : '.min'
        }))

rollup-plugin-eslint

Verify entry point and all imported files with ESLint

MIT
Latest version published 5 years ago

Package Health Score

44 / 100
Full package analysis

Popular rollup-plugin-eslint functions