<commit_before>const ruleTester = require('stylelint-rule-tester');
const valueBorderZero = require('..');

const messages = valueBorderZero.messages;
const testRule = ruleTester(valueBorderZero.rule, valueBorderZero.ruleName);

const basics = (tr) => {
  tr.ok('');
  tr.ok('a {}');
  tr.ok('@import \'foo.css\';');
};

testRule({ convention: '0' }, (tr) => {
  basics(tr);

  tr.ok('a { border: 0; }');
  tr.notOk('a { border: none; }', '\'border: 0\' is preferred over \'border: none\'. (value-border-zero)');

  tr.ok('@media print { a { border: 0; }}');
  tr.notOk('@media print { a { border: none; }}', '\'border: 0\' is preferred over \'border: none\'. (value-border-zero)');
});

testRule({ convention: 'none' }, (tr) => {
  basics(tr);

  tr.ok('a { border: none; }');
  tr.notOk('a { border: 0; }', '\'border: none\' is preferred over \'border: 0\'. (value-border-zero)');

  tr.ok('@media print { a { border: none; }}');
  tr.notOk('@media print { a { border: 0; }}', '\'border: none\' is preferred over \'border: 0\'. (value-border-zero)');
});
<commit_msg>Update index.js<commit_after>const ruleTester = require('stylelint-rule-tester');
const valueBorderZero = require('..');

const messages = valueBorderZero.messages;
const testRule = ruleTester(valueBorderZero.rule, valueBorderZero.ruleName);

const basics = (tr) => {
  tr.ok('');
  tr.ok('a {}');
  tr.ok('@import \'foo.css\';');
};

testRule({ convention: '0' }, (tr) => {
  basics(tr);

  tr.ok('a { border: 0; }');
  tr.notOk('a { border: none; }', '\'border: 0\' is preferred over \'border: none\'. (value-border-zero)');

  tr.ok('@media print { a { border: 0; }}');
  tr.notOk('@media print { a { border: none; }}', '\'border: 0\' is preferred over \'border: none\' (value-border-zero)');
});

testRule({ convention: 'none' }, (tr) => {
  basics(tr);

  tr.ok('a { border: none; }');
  tr.notOk('a { border: 0; }', '\'border: none\' is preferred over \'border: 0\' (value-border-zero)');

  tr.ok('@media print { a { border: none; }}');
  tr.notOk('@media print { a { border: 0; }}', '\'border: none\' is preferred over \'border: 0\' (value-border-zero)');
});

{'fraction_non_alphanumeric': 0.24613944782405242, 'fraction_numerical': 0.008423022929340197, 'mean_word_length': 3.9953271028037385, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3570459', 'n_tokens_mistral': 805, 'n_tokens_neox': 768, 'n_words': 189}