Skip to content

Instantly share code, notes, and snippets.

@nickserv
Forked from maladr0it/.eslintrc.json
Last active October 12, 2019 00:11
Show Gist options
  • Save nickserv/e24e9240dbe2b2d4884422f99e039ff4 to your computer and use it in GitHub Desktop.
Save nickserv/e24e9240dbe2b2d4884422f99e039ff4 to your computer and use it in GitHub Desktop.
{
"env": {
"browser": true,
"es6": true,
"node": true
},
"extends": "eslint:recommended",
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 2018,
"sourceType": "module"
},
"plugins": ["react"],
"rules": {
"react/jsx-uses-react": "error",
"react/jsx-uses-vars": "error"
}
}
import React from "react";
import "./App.scss";
const App = () => {
return (
<div className="App" />
);
};
export default App;
{
"private": true,
"dependencies": {
"eslint": "^6.5.1",
"eslint-plugin-react": "^7.16.0"
}
}
const path = require("path");
const HtmlWebPackPlugin = require("html-webpack-plugin");
module.exports = {
output: {
path: path.resolve(__dirname, "dist"),
},
module: {
rules: [
{
test: /\.(js|jsx)$/,
use: {
loader: "babel-loader",
},
},
{
test: /\.html$/,
use: [
{
loader: "html-loader",
},
],
},
{
test: /\.s[ac]ss$/i,
use: ["style-loader", "css-loader", "sass-loader"],
},
{
test: /\.css$/i,
use: ["style-loader", "css-loader"],
},
],
},
resolve: {
extensions: ["*", ".js", ".jsx"],
},
plugins: [
new HtmlWebPackPlugin({
template: "./src/index.html",
filename: "./index.html",
}),
],
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment