Skip to content

Commit

Permalink
Resolve formatting conflict between ESLint and Prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
tshemsedinov committed Aug 15, 2024
1 parent f49f223 commit 13de826
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 209 deletions.
10 changes: 0 additions & 10 deletions .prettierrc

This file was deleted.

10 changes: 7 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
'use strict';

const { recommended } = require('@eslint/js').configs;
const configPrettier = require('eslint-config-prettier');
const pluginPrettier = require('eslint-plugin-prettier');

const metarhia = {
const configMetarhia = {
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'commonjs',
globals: {
BigInt: true,
console: true,
},
},
plugins: { prettier: pluginPrettier },
ignores: ['node_modules/*'],
rules: {},
};
Expand All @@ -28,7 +32,7 @@ const files = [
const sections = files.map(require);

for (const section of sections) {
Object.assign(metarhia.rules, section);
Object.assign(configMetarhia.rules, section);
}

module.exports = [recommended, metarhia];
module.exports = [recommended, configPrettier, configMetarhia];
Loading

0 comments on commit 13de826

Please sign in to comment.