tonyfromundefined / eslint-config-tonyfromundefined

πŸ’… ESLint Config by @tonyfromundefined

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

πŸͺ’ eslint-config-tonyfromundefined

Tony's ESLint Configuration, which considers import and property ordering important.

How to use

$ yarn add eslint-config-tonyfromundefined
// .eslintrc.js
module.exports = {
  root: true,
  extends: ["tonyfromundefined"],
}

Features

Examples

// Error
const myObject = {
  b: 2,
  a: 1,
};

// OK
const myObject = {
  a: 1,
  b: 2,
};
// Error
import MyComponent from "./MyComponent";
import { useEffect } from "react";

// OK
import { useEffect } from "react";

import MyComponent from "./MyComponent";
/**
 * Only works in `*.css.js`, `*.css.ts`
 */
import { style } from "@vanilla-extract/css"

// Error
export const myClassName = style({
  alignItems: "center",
  bottom: "1rem",
  display: "flex",
  left: "1rem",
  top: "1rem",
});

// OK
export const myClassName = style({
  top: "1rem",
  bottom: "1rem",
  left: "1rem",
  display: "flex",
  alignItems: "center",
});

About

πŸ’… ESLint Config by @tonyfromundefined


Languages

Language:JavaScript 100.0%