Skip to content

Commit

Permalink
Merge pull request #1200 from priyang12/master
Browse files Browse the repository at this point in the history
Modify .eslintrc.cjs for explicit-member-accessibility
  • Loading branch information
pavish committed Mar 22, 2022
2 parents 37c32d0 + 26b7b24 commit 4be6ffe
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
10 changes: 10 additions & 0 deletions mathesar_ui/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ module.exports = {
rules: {
'import/no-extraneous-dependencies': ['error', { devDependencies: true }],
'no-console': ['warn', { allow: ['error'] }],
'@typescript-eslint/explicit-member-accessibility': 'off',
'@typescript-eslint/ban-ts-comment': [
'error',
{
Expand Down Expand Up @@ -106,6 +107,15 @@ module.exports = {
'@typescript-eslint/require-await': 'off',
},
},
{
files: ['*.ts', '*.tsx'],
rules: {
'@typescript-eslint/explicit-member-accessibility': [
'error',
{ accessibility: 'no-public' },
],
},
},
],
env: {
es6: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ export type ValidationResultStore = Writable<boolean>;
const VALIDATION_CONTEXT_KEY = 'validationContext';

class ContextBasedValidator {
public validationResult: Writable<boolean> = writable(true);
validationResult: Writable<boolean> = writable(true);

public validationFunctionMap: Map<string, ValidationFunction> = new Map();
validationFunctionMap: Map<string, ValidationFunction> = new Map();

public validate(): boolean {
validate(): boolean {
let isValid = true;
// eslint-disable-next-line no-restricted-syntax
for (const validationFn of this.validationFunctionMap.values()) {
Expand All @@ -22,7 +22,7 @@ class ContextBasedValidator {
return isValid;
}

public addValidator(key: string, fn: ValidationFunction) {
addValidator(key: string, fn: ValidationFunction) {
this.validationFunctionMap.set(key, fn);

onDestroy(() => {
Expand Down

0 comments on commit 4be6ffe

Please sign in to comment.