Skip to content
This repository has been archived by the owner on Nov 19, 2021. It is now read-only.

Commit

Permalink
Fix some lint rules
Browse files Browse the repository at this point in the history
  • Loading branch information
Allypost committed Apr 27, 2021
1 parent 18ad3a6 commit fad95c5
Show file tree
Hide file tree
Showing 10 changed files with 26 additions and 13 deletions.
12 changes: 12 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,18 @@ module.exports = {
],
// add your custom rules here
rules: {
"no-lone-blocks": "off",
"no-redeclare": "off",
"@typescript-eslint/no-redeclare": [ "error" ],
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": [
"error",
{
args: "after-used",
argsIgnorePattern: "^_",
caughtErrors: "none",
},
],
"lodash-fp/prefer-constant": "warn",
"no-dupe-class-members": "off",
"@typescript-eslint/no-var-requires": "off",
Expand Down
2 changes: 1 addition & 1 deletion api/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ query(dbBase)
})
;

app.use((err, req, res, next) => {
app.use((err, req, res, _next) => {
const status = 500;

const errorData = error({
Expand Down
2 changes: 1 addition & 1 deletion api/routes/news.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const processNews =

const newsImages = Object.fromEntries(
imageList.map(
({ name, imageId, ...image }) =>
({ name, imageId: _imageId, ...image }) =>
[ name, image ]
,
),
Expand Down
2 changes: 1 addition & 1 deletion hooks/render.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
query,
} from "../db/methods";

export default (nuxtConfig) => ({
export default (_nuxtConfig) => ({

async routeDone(_url, _result, { nuxt }) {
if (!nuxt.state) {
Expand Down
2 changes: 1 addition & 1 deletion nuxt.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ export default {
cssModules: {
modules: {
localIdentName: "[path][name]__[local]",
getLocalIdent({ resource, ...loaderContext }, localIdentName, localName, options) {
getLocalIdent({ resource: _resource, ...loaderContext }, localIdentName, localName, options) {
if (!options.context) {
// eslint-disable-next-line no-param-reassign
options.context = loaderContext.rootContext;
Expand Down
2 changes: 1 addition & 1 deletion pages/admin/press/releases/new.vue
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ name: PageAdminPressReleaseCreate
},
watch: {
date(val) {
date() {
this.dateFormatted = this.formatDate(this.date);
},
},
Expand Down
3 changes: 2 additions & 1 deletion pages/press.vue
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,8 @@ name: PagePress
methods: {
thumbSrc(item) {
const { default: _, ...imageObj } = item;
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const { default: _default, ...imageObj } = item;
const images =
Object
.entries(imageObj)
Expand Down
6 changes: 3 additions & 3 deletions store/news.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,21 +37,21 @@ export const actions = {
return data;
},

async updateNewsItem({ commit, state }, { slug, news }) {
async updateNewsItem(_context, { slug, news }) {
return await this.$api.$patch(
`/news/item/${ slug }`,
news,
).catch((e) => e);
},

async createNewsItem({ commit, state }, { news }) {
async createNewsItem(_context, { news }) {
return await this.$api.$put(
"/news/item/",
news,
).catch((e) => e);
},

async deleteNewsItem({ commit, state }, { slug }) {
async deleteNewsItem(_context, { slug }) {
return await this.$api.$delete(
`/news/item/${ slug }`,
).catch((e) => e);
Expand Down
6 changes: 3 additions & 3 deletions store/pressRelease.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,21 +40,21 @@ export const actions = {
return pressRelease;
},

async createPressRelease({ commit }, data) {
async createPressRelease(_context, data) {
return await this.$api.$put(
"/press-release",
data,
);
},

async updatePressRelease({ commit }, data) {
async updatePressRelease(_context, data) {
return await this.$api.$patch(
`/press-release/${ data.id }`,
data,
);
},

deletePressRelease({ commit }, { id }) {
deletePressRelease(_context, { id }) {
return this.$api.$delete(
`/press-release/${ id }`,
);
Expand Down
2 changes: 1 addition & 1 deletion store/resume.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export const getters = {
basicInfo,
education: {
headers: [ "Obrazovna institucija", "Usmjerenje", "Godina završetka" ],
values: resume.educations.map(({ awardedTitle, module, name, year }) => [ name, module, year ]),
values: resume.educations.map(({ awardedTitle: _awardedTitle, module, name, year }) => [ name, module, year ]),
},
projects: {
headers: [ "Tvrtka / projekt", "Pozicija", "Trajanje" ],
Expand Down

0 comments on commit fad95c5

Please sign in to comment.