Configure linting for functional programming
This commit is contained in:
parent
9ddda03bd6
commit
126c6f4884
@ -1,17 +1,21 @@
|
|||||||
import js from "@eslint/js";
|
import fp from 'eslint-plugin-fp';
|
||||||
import globals from "globals";
|
import js from '@eslint/js';
|
||||||
import tseslint from "typescript-eslint";
|
import globals from 'globals';
|
||||||
import { defineConfig } from "eslint/config";
|
import tseslint from 'typescript-eslint';
|
||||||
import eslintConfigPrettier from "eslint-config-prettier/flat";
|
import { defineConfig } from 'eslint/config';
|
||||||
|
import eslintConfigPrettier from 'eslint-config-prettier/flat';
|
||||||
|
|
||||||
export default defineConfig([
|
export default defineConfig([
|
||||||
{
|
{
|
||||||
files: ["**/*.{js,mjs,cjs,ts}"],
|
files: ['**/*.{js,mjs,cjs,ts}'],
|
||||||
plugins: { js },
|
plugins: { js, fp },
|
||||||
extends: ["js/recommended"],
|
extends: ['js/recommended'],
|
||||||
|
rules: {
|
||||||
|
'fp/no-mutation': 'error',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
files: ["**/*.{js,mjs,cjs,ts}"],
|
files: ['**/*.{js,mjs,cjs,ts}'],
|
||||||
languageOptions: { globals: globals.browser },
|
languageOptions: { globals: globals.browser },
|
||||||
},
|
},
|
||||||
tseslint.configs.recommended,
|
tseslint.configs.recommended,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user