2
0
mirror of https://github.com/frappe/books.git synced 2024-11-09 15:20:56 +00:00

chore: config eslint with vue-eslint and prettier

- fix prettier issues
This commit is contained in:
18alantom 2023-06-23 10:40:16 +05:30
parent f652cdca0a
commit d42d0841aa
7 changed files with 26 additions and 24 deletions

View File

@ -3,12 +3,13 @@ module.exports = {
env: {
node: true,
browser: true,
es2020: true,
es2018: true,
},
rules: {
'no-console': 'warn',
'no-debugger': 'warn',
'arrow-body-style': 'off',
'prettier/prettier': 'warn',
'prefer-arrow-callback': 'warn',
'vue/no-mutating-props': 'off',
'vue/multi-word-component-names': 'off',
@ -20,15 +21,22 @@ module.exports = {
'@typescript-eslint/no-floating-promises': 'warn',
'@typescript-eslint/no-misused-promises': 'warn',
},
parser: '@typescript-eslint/parser',
parserOptions: { project: true, tsconfigRootDir: __dirname },
plugins: ['@typescript-eslint'],
parser: 'vue-eslint-parser',
parserOptions: {
parser: '@typescript-eslint/parser',
project: true,
tsconfigRootDir: __dirname,
sourceType: 'module',
extraFileExtensions: ['.vue'],
},
plugins: ['@typescript-eslint', 'prettier'],
extends: [
'plugin:vue/vue3-strongly-recommended',
'plugin:vue/vue3-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
],
ignorePatterns: [
'*.mjs',
'.eslintrc.js',
'tailwind.config.js',
'node_modules',

View File

@ -40,14 +40,7 @@ export class AccountingLedgerEntry extends Doc {
static getListViewSettings(): ListViewSettings {
return {
columns: [
'date',
'account',
'party',
'debit',
'credit',
'referenceName',
],
columns: ['date', 'account', 'party', 'debit', 'credit', 'referenceName'],
};
}
}

View File

@ -1,7 +1,10 @@
import { Doc } from 'fyo/model/doc';
import { ListViewSettings } from 'fyo/model/types';
import { PriceListItem } from './PriceListItem';
import { getPriceListEnabledColumn, getPriceListStatusColumn } from 'models/helpers';
import {
getPriceListEnabledColumn,
getPriceListStatusColumn,
} from 'models/helpers';
export class PriceList extends Doc {
isEnabled?: boolean;
@ -11,7 +14,11 @@ export class PriceList extends Doc {
static getListViewSettings(): ListViewSettings {
return {
columns: ['name', getPriceListEnabledColumn(), getPriceListStatusColumn()],
columns: [
'name',
getPriceListEnabledColumn(),
getPriceListStatusColumn(),
],
};
}
}

View File

@ -1,13 +1,10 @@
import { Doc } from 'fyo/model/doc';
import {
ListViewSettings,
} from 'fyo/model/types';
import { ListViewSettings } from 'fyo/model/types';
export class Batch extends Doc {
static getListViewSettings(): ListViewSettings {
return {
columns: ["name", "expiryDate", "manufactureDate"],
columns: ['name', 'expiryDate', 'manufactureDate'],
};
}
}

View File

@ -1,5 +1,3 @@
import General from './general.vue';
import GreenCheck from './green-check.vue';
import Invoice from './invoice.vue';

View File

@ -5,4 +5,4 @@ import { Fyo } from 'fyo';
* testing purposes a separate instance of fyo should be initialized.
*/
export const fyo = new Fyo({ isTest: false, isElectron: true });
export const fyo = new Fyo({ isTest: false, isElectron: true });

View File

@ -1,4 +1,3 @@
export const routeFilters = {
SalesItems: { for: ['in', ['Sales', 'Both']] },
PurchaseItems: { for: ['in', ['Purchases', 'Both']] },